Need help. Troubleing issue with UI after project built

Everything looks and works as expected while in the Unity editor in play mode. No issues in play mode.
Screenshot of top right of UI in play mode:

After I build the project and run the exe the UI on the top right is missing during runtime. I have edited the top left UI elements from the image by drawing a white rectangle over the screen shot. They work fine in runtime with no issues. The top right UI is just gone!

I don’t understand. The button and input field at the top right of the screen are to be present the entire time. When the button in the top right is pressed it brings up another menu. There is no code making the top right menu invisible or changing the elements in anyway. Before making the second build I did write code that makes the input field and button in the top right always setActive(true);. It still didn’t show during runtime. For another build I moved the top right UI next to the top left UI to see if it was being cropped out even though my screen resolution is 1920x1080 and that’s the same resolution as the project. I do have canvas scaling setup for the 16:9 aspect ratio. It still won’t show. I don’t know what’s going on here. I need help with this one.

I think I found a fix for this. In the build window I removed the scenes and then added them back and built the project again. The new build works in runtime just like the Unity editor in play mode. I’m not sure why that fixed it or why it behaved weird to begin with.