How do I disallow screen sharing for Messages?

Apple's Messages app is not listed among the apps in Security settings for Screen Recording. This would be the normal place for most apps to disallow screen sharing, but the absence of Messages from the list seems to mean that there's no way to control this in the normal GUI.

How do I disallow screen sharing for Messages?


Not exactly an answer, but reading documentation: Share screens using Messages on Mac I noticed:

You can’t send a message to someone who’s restricted by communication limits in Screen Time.

And:

Tip: Don’t want someone to send you screen-sharing invitations? When you receive an invitation from them, hold the pointer over the Decline button, click the down arrow, then click Block User.

It should be possible to restrict your child (or yourself) with communication limits (Set up communication limits in Screen Time on Mac) and this way disallow screen sharing. Whether cost of doing it is too high is another story.