I had this issue back in Godot 3.5 and hoped that it'd be gone, but Panels and some other Control Nodes still resize magically when executing another scene. This is such weird behaviour, that I have no idea where it might come from. Has anyone ever seen such a thing happen before? Here is a video of the bug in acton: https://piped.kavin.rocks/watch?v=79DYDT5qngk
Looks like a bug. Try creating a minimal reproduction project with just these 2 scenes and creating an issue on GitHub. Don't forget to mention that it happens in both Godot 3 and 4. Best of luck.