I've raised this bug a few times now. I'll try to retrace what I did step by step so hopefully you can replicate the bug and figure out how to fix it.
1. Do a windowed recording. Stop the recording normally.
2. Change to fullscreen mode. Start a fullscreen application and start recording. Stop the recording before exiting the application.
3. Exit the fullscreen application. Change to windowed mode from the past history list.
4. If the recording window is currently invisible, when you make it visible sometimes the size will read "1920x1080 (my fullscreen resolution)" despite being a window.
The recorded footage will start from the top-left corner instead of the selected window, and include the recording window in it, as seen in the attached image.