We will keep this script live, but know Apple's release 10.14.4 has the fix in it.
The following script returns the list of all macOS devices running OS version 10.14 or newer along with their management profile expiration date . Once you run the script, you can then sort by the management profile expiration date. Find those expiring soon and re-enroll them in the service. That will keep them managed in the Intune service.