How can we scope the limit to `stringToEscape` size to .NET Core 3.1 and earlier + .NET Framework? The limitation was removed in 5.0 in PR https://github.com/dotnet/corefx/pull/41686