So far, I think the issue lies with the ship class. The default transport uses the cargo class. This class is mostly defined by it's cost. A stripped down cargo class ship costs the same as a fighter, but it has no inherent abilities, no doctrine, and it is generally very vulnerable to enemy fire.
It's not something I'd pack full of marines and send to the front lines.
Instead try using a cruiser instead. AFAIK this also changes the ships designation. Cruisers tend to be pretty safe in the targeting metric, at least as far as I can tell so far. I'm still in the infant stages of ship design and combat.
So, some ideas.
I like to kite out my transport cruisers with support modules, some missiles to help take out small/medium ships, and a comfortable amount of defenses, espesially anti-missile (they tend to be cheap too).
But a safer design may be to "return fire only" with anti-fighter weapons instead. This would give even more room for defenses/support stuff, and the transport would be able to dispatch smaller faster things that break through the lines on its own. In theory, by setting it to return fire only, it will always be focusing targets that are set to target it first, and it won't push up into combat range. The cost for this is it also won't contribute to the fight unless it needs to.
Now, theorycrafting a response to your opponents strategy...
In some older space games, like Stars!, there used to be a strat that involved building lots of chaff as a defense. I mentioned freighters being really cheap, right?
If the enemy wants to set their doctrine to target unclassified support. Great. Throw some cheap defenses onto an empty cargo ship and watch their ships get annihilated trying to kill these decoys instead of your valuable ships. Ships do not take opportunity attacks on their way to the main target either. They will fly all the way to your back line while taking heavy fire just to target ships that have no strategic value.
The enemy's decision to cheese your transports can itself be cheesed right back.