“No such thing as a dumb question”, as I have always told students. This happens to me all the time, with FCP also.
I work on a MacBook Pro; at home or in a properly equipped studio I connect a larger monitor as a dual desktop, and elsewhere I am on just the laptop display, for quick comps.
I have never found a easy fix, although there are a couple apps out there that help — one is Moom, which I tried, but I have this reluctance to run other apps while in AE or FCP, which are memory hogs.
Set up the best possible workspace for the project you are in, then assign a hotkey to it. I often need to have different workspaces for different projects, and use “Standard” when using the on-board display at a coffee shop or wherever.