Hello community!
I am currently trying to make a UI with a small game window inside that can be resized and moved at runtime. A visualization of what I am trying to achieve:

Firstly, is this possible? I have come quite close, but when i resize and/or move the game viewport, the following happens:

The viewport does resize, but leaves a trail of overlapping images. In this setup, the UI is in screen-space-overlay and a camera is rendering the game viewport. I have read that my problem may be caused from moving the viewport over an area that is not rendered by any other camera. I have tried several things, such as having a separate camera with only render texture to represent the black area. However, I have not been able to make it work.
Hoping someone could help me resolve this issue. In advance, thank you!