UV island stack detection is broken in Blender 5.22

I wanted to stack these grid UV islands, but the default setting won’t stack them. When I switched to Topology and Scale mode, Blender threw an error.

Hi, I checked on my test files and can not confirm the bug. Could you attach your blend file?

Sorry, this file contains private information, but I still can’t stack the UVs.Can you fix it based on the error message?