How to disable (or fix) automatic "End Class" -> "End Structure" replacement?

a b 1 Reputation point
2022-10-04T13:47:37.633+00:00

In Visual Studio 2019, using Visual Basic, when I have

Public Structure Foo  
End Structure  

and replace the "Structure" with "Class", Visual Studio tries to be helpful and replace the matching other "Structure" with "Class" too. When it works, it's fine, but this works at most once when replacing multiple instances:

Public Structure Foo 'Line 1  
    Public Structure Bar  
        Public Structure Baz  
        End Structure  
        Public Structure Blarg  
        End Structure  
        Public Structure Bloop  
        End Structure  
    End Structure  
End Structure  

When I replace "Structure" in line 3 with "Class", sometimes Visual Studio replaces the matching one in line 4 too, and sometimes it doesn't and I have to manually fix it. That alone wouldn't be a big deal, but from there on it completely breaks:
When I go on and replace "Structure" in line 5, the matching one in line 6 is never replaced!
And it gets worse! When I then manually replace the one in line 6, Visual Studio automatically replaces the not-so-matching one in line 2, causing everything to break!

How do I disable this infuriating behavior without disabling other important functionality?

PS:
I would also like to use this opportunity to scold whoever thought it was a good idea to change the Intellisense behavior from what it was in Visual Studio 2010. It was already perfect, then you broke it in newer versions.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,690 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,602 questions
{count} votes