Only because you carjack that bf injection near a cop, you instantly get a 1* wanted level, and when you allowed the owner to carjack you, you were knocked down allowing the cop to bust you
People don’t know that the guy you follow in this mission is actual the guy who phones you saying “hey put Leo on man I think we got a buyer for Diaz merchandise” so maybe he was one of the ones who shot at you in the beginning along with the chef guy who knows
I believe the glitch was that the dealer became bugged after his driver was carjacked and killed, as he no longer moved or attacked Tommy until he attacked him, which probably fixed the glitch and made him try to escape again.