Not sure how much help it is, but pressing the weapon to manually draw/sheath your weapon will allow you to dismount as well. So, you could just get in the habit of pressing that before entering combat.