In order to configure MDM Group Policy to be applied during the office hours only:
Go to Group Policies > tick required group > click on Office Hours > specify the timeframe:
Note: Office hours feature is only available for location tracking. When enabled, locations are tracked during the specified office hours only. Settings may take up to 30 mins to be applied.