You could try to rename this file on your machine:
/usr/share/teams/resources/app.asar.unpacked/node_modules/slimcore/bin/rect-overlay
Many people meet with screen sharing issue in Teams for Linux. They have a discussion here. You can check if there is any similar scenario as yours.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.