Microsoft Teams and macOS Catalina (10.15) broken screen sharing

When screen sharing in Microsoft Teams and macOS Catalina is broken, starting closing apps until it works and you can share you screen again!