Thank you for reaching out to us. As I understand you are looking to remove on-premise disabled users from Azure AD groups ( if my understanding is incorrect, please let me know ).
You can refer to this article https://arconnetblog.wordpress.com/2018/12/07/clean-azure-ad-groups-for-disabled-users/ (similar requirement as yours cleaning up of on-premise disabled users from Azure AD Group).
Note: Please test the script in test environment before implementing in production.
Let me know if you have any further questions.