Org-agenda provides the possibility to automatically restore the previous
window configuration after closing the agenda buffer using org-agenda-quit
(bound to q). This is achieved by setting
org-agenda-restore-windows-after-quit to t.
However, there is also another way to "exit" the agenda, namely
If you globally rebind M-q, then `org-fill-paragraph' will not work
properly anymore.
The reason is that `org-fill-element' has the line
(src-block (org-babel-do-key-sequence-in-edit-buffer (kbd "M-q")))
While of course M-q is the default binding for `fill-paragraph', org
should respect that t