When I was using Visual Studio 2017 my code was read-only until I hit "break all" or a breakpoint. I'm pretty sure this was out-of-the-box without me changing any option. I'm talking about Windows desktop development with C# and edit-and-continue.
With 2019 I'm always able to change the code, but since the debugger is not paused the change, highlighted with a green squiggle, can't be compiled on the fly.