Error when clicking on 'Attach To Unity' after update to 2021

I use the option to ‘Attach to unity’ a lot, but since I updated to 2021 if I click on Attach to Unity I get an error in the console :

The requested operation cannot be performed on a file with a user-mapped section open.
0 file(s) copied.

Only closing unity and opening it again solves the issue, I tried updating Visual Studio to the last version but the issue persists, does anyone know how can I debug my code in visual studio on Unity 2021?

Also experiencing this when Reverting back from debug mode after adding UI Toolkit.
Switching between modes were working correctly before, now i’m stuck in debug mode even after restarting unity.

unfortunately I found no solution for this, I have been working without debug since I updated to 2021 (which makes things way harder to work with), I use Unity in 2 different computers (with a recent fresh install in the second one) and the problem happens there too, my Visual Studio version did not change so it has to be on Unity’s side, but I did not update to the very last version of Unity yet