This happens because, when you connect, your head unit sends a Play command over Bluetooth. This is handled by the last-used media player, or by the default media player if none has been used yet.
This can be addressed in Tasker. Create a profile with the trigger State > Net > Bluetooth Connected, and choose the name or MAC of your head unit. For the task, use the action Media > Media Button Events > Grab.
Now, when you connect to the head unit, the play event will be routed to Tasker instead of to your music player. You could create a profile in Tasker to respond to this event, but since you haven't, nothing happens.
The play/pause controls on your head unit won't work until you launch your music player. At that point it will grab the media button events from Tasker. You could have Tasker wait a few seconds and launch your default music player after doing the grab; this will ignore the media button events during the wait and then re-enable them when the music app launches.