The built-in shortcut key – Windows + Arrow keys in Windows 11 is to quickly snap a window to a side of the screen.

You can press Windows + Up, Down, Left or Right arrow keys to snap a window to the top, bottom, left or right of your screen respectively.

You can try to use this method to force snap an off-screen window back to your main screen.

While selecting the problem window (just select the app on the taskbar), try to press Windows + Left (or Right) arrow keys repeatedly and see if the window that went off-screen can be brought back to your main screen.