You can use the state system to disable abilities (i.e. add a state preset to each ability that you want to disable which sets "Enabled" to false, and assign that state preset to the relevant state name). The issue here is how to activate that state, since the basic rotational movement is not an ability or anything that could easily activate a state.
The easiest solution I can think of is to have a simple script that runs on the character and checks the character's current rotation, and manually activates/deactivates that state (using StateManager.SetState) based on the rotation value. E.g. you could check the character object's transform euler angles Y value, and if it's a multiple of 90 (or within +/- 5 degrees or so, e.g. 85-95) then activate the state.
More info on the state system:
https://opsive.com/support/documentation/ultimate-character-controller/state-system/