How can I prevent the badge from overlaying content inside a window?
You can prevent the badge from overlaying content inside a window by selecting the Badge option in the settings of the app and then selecting the Around Only option for the Overflow.