Use the kickstart command-line utility on macOS Mojave 10.14

To control a remote Mac with Screen Sharing, turn on Remote Management on the target device. Or use these steps to manage devices that are enrolled in Mobile Device Management (MDM).

For increased security in macOS 10.14, Screen Sharing gives you view-only access when you use the kickstart command-line tool 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. If Remote Management is already selected, deselect it and select it again.