AFAIK, this cant be set! By default the same can’t be used during a password change but there’s no check against the history! I’d recommend you read this documentation as well:
If you use AAD Connect to sync your users from on-premises Active Directory to Office 365, you would be able to enforce this using on-premises AD - because password changes are managed there.