Pretty long shot....
I guess on Windows it is possible, but for console only.
GUI wouldn't work, because it is frozen at that time (unless focus remains for some reason on the IDE, when it was continued with F9 / I don't recall having had that issue)
On Linux, you normally have the IDE build in console window (which may be offered as option under Windows too - at some point).
Or on Linux you have used a "launch app" (though that hasn't worked for a decade) and then the the launch app is an independent app, and wouldn't necessary be tracked...
On Windows, it would depend on the Win API, if you can bring a console window to the front, if all you have is the handle of the process running in it....
And then it would be a windows only feature. Wouldn't reject it, but with the tons of other stuff going on....
Are you aware that with Lazarus 3.99 (Windows) under "Run Params" you can specify the position of the console win. (size or row/column partially works).
So if you have a corner of free space on the screen, you should be able to make sure it will always be there.
Also, if you have just only worked in the IDE, and nothing else, then "Alt Tab" should switch to it?