I am also encountering this issue.
Steps to reproduce:
1) Start a Microsoft Teams meeting from your local machine and invite some team members.
2) Share your screen in the Microsoft Teams meeting. The other meeting attendees should be able to see your screen just fine.
3) RDP into a remote machine while still sharing your screen.
4) None of the meeting attendees will be able to see your screen. The screen will be completely black.
The only possible workaround is to RDP into your remote machine first and THEN start a Microsoft Teams meeting from within the remote machine, but this really isn't an acceptable workaround in many cases for the following reasons.
1) Microsoft teams meetings consume an enormous amount of bandwidth and you will likely encounter latency issues if trying to host/join a Microsoft teams meeting through an RDP session on the remote machine.
2) It is often not acceptable to install Microsoft teams software on the remote machine to begin with. If an IT worker (DBA, Engineer, Server Admin etc.) needs to share something on a machine that they are responsible for, it is usually not acceptable to install Microsoft Teams on the remote machine. Their only option would be to start the Microsoft Teams meeting from their local machine, share their screen, and then RDP into the remote machine while sharing their screen.