When copying a library, you get this error message:
Copying the library to a new URL will break its functionality, so the copy cannot be completed. Modern Site Pages must be copied to the default Site Pages library.
This error occurs when a Site Pages library is migrated to a different URL at the destination.
The Site Pages library is a default library created when activating the Site Pages SharePoint feature. The library cannot function properly when moved to a different URL. If you ignore this error, you will be unable to edit or add to the Site Pages library in your destination.
The only solution is to migrate your library to the correct URL.