Too few informations
Where do you use the second scene? In the same collection? Different textures? I suspect it might be regarding Texture of GUI node invisible in runtime/build, but visible in editor if the box is never shown or eventually it is somehow moved out of the stencil in your code?