I am forced to use ms teams for work. Every time I attempted to share my desktop, teams would crash. I thought it was just because teams sucks. As it turns out, it seems to be that running under wayland was actually causing it. Everything works fine under x.org. After I was running with x.org for a couple days, I realized there are quite a few little oddities that I just lived with and didn't realize it was because wayland was actually messing things up.
- An unofficial Teams app (https://github.com/IsmaelMartinez/teams-for-linux) which works great - screen sharing works without problems, no crashing, and native notifications!.
- Use teams in qutebrowser: the dev (The-Compiler) added support for screensharing and it works great. Just like the unofficial app above, it also has native notifications, not the weird popup notifications of the official app.