You can try this driver, it should work with all Zigbee motion sensors that use the IAS messaging. Click on 'Advanced Options', select 'Other Motion Sensors (IAS)', Save the preferences. Then click Configure. Refresh the page (F5), you should see 'deviceProfile : NONTUYA_MOTION_IAS'.
If there is no any Zigbee message received form the sensor in the last 13 hours (battery report or any other check-in message ) the driver will reset the motion attribute to inactive (if it was stuck active), and will set the healthStatus to offline. If you decide to try it, you can comment on any issues in the driver thread. To return to the stock driver, use the inbuilt 'Device' driver to delete all custom states and scheduled jobs first.
With this driver I use Device Activity Check with healthCheck option to receive notifications for inactive devices. But the driver itself will reset the motion to inactive, which ensures your automations will not be screwed.. No need to modify anything in your pistons,
BTW, you could also check whether the current webCoRE versions give you access to Hubitat ''Last Activity" or 'Status' device properties. These can be used in most of the cases to determine whether a device is online or not, but these are not always correct, as they depend on the presumption, that the driver will send any event within a 24-hour period.
An example of wrong INACTIVE status by Device Health Status app - the Ikea outlet is always on, so it doesn't send any on/of messages, so Hunitat considers it as inactive/offline. Actually, the plug is working well and is acting as a repeater for many battery-powered device