Widget gets invisible when leaving canvas bounds just a bit

Hello community,
my TreeWidget is pannable but while panning all widgets that leaves the bounds of the canvas gets invisible.
I made a short video to show what I mean.
YouTube Video

Does anyone know how to fix this so they stay visible?

Thanks alot

Nvm found the problem after a few minutes of posting the question.

The widgets dont have there real (bounding) size inside the canvas. I needed to set the size of the canvas slot manually or set auto size to true.