Hello and sorry for the late reply.
I can confirm that there is this issue when using this specific combination: Scripting Runtime Version: .NET 4.x Equivalent API Compatibility Level: .NET Standard 2.0
If however the “API Compatibility Level” is set to “.NET 4.x”, or like @crazyasian stated, the “Scripting Runtime Version” is set to “.Net 3.5”, there is no such issue. With that said, using API Compatibility Level “.Net 4.x”, instead of “.NET Standard 2.0” when using “.Net 4.x Equivalent”, is highly recommended right not for performance reasons, although this is something I need to look into.