For me, in 4.22 and 4.23, the Epic Launcher picks the default “documents” folder for the user. In this case “C:\Users\michael\Documents\Unreal Projects\MyProject”
I was getting these “too long” messages and moved the project in File Explorer.to a 2nd drive:
“d:\Unreal Projects\MyProject” or why not “c:\MyProject”
The other option is to use fewer folders in your project. I picked a framework with alot of organization, and always generates these messages. The Cooker seems to be using the “C:\users…” filename instead of the “D:” one for the project when testing the filename.