For increased security in macOS 10.14 and later, Screen Sharing gives you view-only access when you use MDM to enable Remote Management on a Mac. If you want to both view and control the remote Mac with Screen Sharing, open System Preferences on the target Mac, click Sharing, then select the Remote Management checkbox.
Use Screen Sharing to control a Mac that's enrolled in MDM
If the target Mac is enrolled in Mobile Device Management (MDM), you can use the Enable Remote Management command to enable screen sharing and use the Privacy Preferences Policy Control payload to enable control. Use the PostEvent key and set the the Identifier string to
com.apple.screensharing.agent, then set the IdentifierType string to