You can no longer enter a vehicle while you are being attacked, even if you stop attacking. This was a bug. Please do not abuse bugs. Do not practice them to get an advantage. If you are not sure something is a bug or not, please ask.
Aim does not clear when you are attacked. This is on purpose. Imagine you are a Judge, aiming at some target, and some mixer with brass knuckles attacks you. You are not distracted. You are a dough boy wearing full WJF combat gear and even if this mixer does manage to land a hit or two your armor is going to soak that damage and leave you basically unharmed (if not annoyed).
If you are aiming at something or someone and are attacked, you will have to stop aiming.