Visual Studio Code: How to Disable Drag to Edit Text?
// Controls if the editor should allow to move selections via drag and drop.
"editor.dragAndDrop": false,
In Visual Studio Code if you want to do in the app just go to:
File -> Preferences -> Settings -> type "Drag and drop" in the search bar
It should be the first option.
Just to complete the answer : in Visual Studio : Tools -> Options -> Text Editor -> General -> Drag and Drop text editing ( or directly enter "Drag and Drop" in the search bar of the Options window )