This is a weird problem, however, I do have a solution for you. You need this type of component in the scene SceneCaptureComponent2D. If you are not sure how to use the SceneCaptureComponent2D, there is a lot of setup you need to do. Here is a chatgpt explaining how you would do what you are trying to do.
Hope that helps,