The order of preference for the Toggle Macro is as follows. The first one that matches is the action that’s executed.
toggle()command if the device has it- Switch →
on()/off()based on state - Lock →
lock()/unlock()based on state - Door Control →
open()/closed()based on state
If the device has one of the ‘higher’ tier features and you wanted to toggle one of the lower tier features (or if you just wanted more control over the action), you could always create a rule and then use the Rule action instead of the Thing action.