Additional features, settings, or issues not covered by specific Microsoft Teams categories
what has worked for me is keep the privacy and setting windows open all the time. > first thing you do before starting teams - select - unselect - select the TEAMS option in Privacy TAB > Screen Recording.
Keep this window open all the time, and start teams. If you close the Security and Privacy window - screen sharing will disappear.