Hello Ion,
* I am a Microsoft user like you, providing solutions to community members; I am NOT a Microsoft employee.
Here's a response by Jeff Kurpaska on this thread (https://answers.microsoft.com/thread/b7e85924-0376-429c-a549-9950a75cebf9) that solved the issue for me. If that doesn't work, you can check the other suggestions on the thread for one that works for you.
"If you want to turn off the open links in Edge feature, you can do so from Teams settings: Open Settings > Files and links > Link open preferences, and then select the desired browser from the dropdown menu.
Hope this helps.
- Stephen N.