Yeah this is the hurdle you’re hitting, the share feature wasn’t created with this in mind… the link it produces is accessible without logging in, so it puts the PM in a template for public sharing. When multiple people are involved someone might not consent to have it shared (especially publicly) so it’s a simple guard against it.
That modal shows for PMs with 5 or more posts, when there are fewer than that the button simply copies the content of the relevant post to the clipboard for posting wherever.