You indeed found a valid bug, which is fixed in the upcoming version 2.45.1 of snapd.
If you want the fix right away, you can run the following command:
snap refresh snapd --candidate
Otherwise just wait for the fix to be released to the stable channel, it should be there very soon.