Simple Blender script in VS Code causing EXCEPTION_ACCESS_VIOLATION, but works in Blender
I tried to apply a fix for a similar problem you described about the Exception Access Violation error.
The sequence to follow apparently is to go under the Advanced tab under Windows System Properties selection.  Under Performance Options, there is a radio button selection to Turn on DEP for all programs and services except those I select:.
Upon adding Blender 2.90, The DEP prompt displays

You can not set DEP attributes on 64-bit executables&quot;.

I have a 64-bit Windows operating system, in which Blender 2.90 worked temporarily after adjusting the compatibility settings to Windows 8. Apparently a particular Microsoft update doesn't like the software.