It’s a Windows problem. There’s still, to this day, a 259-character limit on path length in the Win32 API unless the OS has been configured to support long paths and the application uses the correct subset of Windows APIs. For example if you use ‘CreateFileA’, you’re stuck with the limit no matter what.
There’s no problem with Python in general. The registry value LongPathsEnabled, which is probably the one you were asked to set, affects the entire Windows system.
However, there’s also an older workaround that allows programs to use “extended paths” even if that setting is off, by prefixing path strings with “\\?\”. So applications using that workaround can use long paths no matter how Windows is configured. But Python doesn’t use the workaround, it uses the modern APIs and if you want long paths, you need to configure the underlying Windows system to enable it.