There is no usable solution. The solutions you can find online answer the question of *copying* the file, but they leave out that doing so makes it very difficult to use the copied files. Once copied vias the various workarounds, the files longer than the maximum path length will be quite difficult to access, requiring rather involved workarounds each time. realistically, it just cuts you off from those files that have longer paths.
The best alternative is to reduce the length of the names of directories to try to reduce the maximum length of the full file path of the most deeply nested files in that structure, as it seems the copy target location has a longer path than the source location which is enough of a difference to make the longer filenames/paths in the copied files be too long.