Hi there,
If this works on Windows 2016 it should work on Windows 2019 too. You might have configured them wrong or defined the long path differently. You can try the Powershell command and see if that helps you.
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
Also note the maximum path of 32,767 characters is approximate, because the "\?\" prefix may be expanded to a longer string by the system at run time, and this expansion applies to the total length.
Maximum Path Length Limitation
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell
--If the reply is helpful, please Upvote and Accept it as an answer--