Just ran into this as well running XCode 13.4.1, testing with device running iOS 15.5. The problem turned out to be swizzling of the AppDelegate methods (by multiple libraries). If you're running into this, do a search for didRegisterForRemoteNotificationsWithDeviceToken across your dependencies and look for any places where swizzling is taking place.
Post
Replies
Boosts
Views
Activity
In case you're still struggling with this, I believe it's (confusing) but expected behavior per docs:
"...the exact length of an invocation URL you can encode in an App Clip Code varies based on the ASCII characters and words you use."
https://developer.apple.com/documentation/app_clips/creating_app_clip_codes/encoding_a_url_in_an_app_clip_code