The access request feature works together with the share command for sites. If someone who is not a site owner for a site (that is, someone who does not have full control for a site) uses the share command to invite other people to view a site, then that action will generate an access request for the site owner. A site owner can then approve or decline the request, or specify the permission level to be assigned to the new user. The access request feature does not determine whether the share function can be used, so, it will not hide the "Share" button.
For modern experience, there is no option to hide "Share" and "Copy Link" buttons.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.