I don't believe it's ever been against the MLB collective bargaining agreement to factor comp picks into a trade. Or for 2 teams to make a handshake agreement to sign each other's Type A/B FAs.
If one or both GMs posted in WC when the trade was accepted that a comp pick was part of the motivation for the deal, that would not be a reason for me to veto the deal.
If other GMs think it is, they could veto the deal.
There are so many other things that could be improved in HBD, I'd hate to punish the GM(s) who thought outside the box and figured a way to put together a win-win deal where part of the win was one or both getting a comp pick.
I get that others will disagree with me on this. Which is why I pointed out that disclose would be important and any deal can be vetoed by fewer than 1/2 the GMs. The veto system isn't perfect, but I can't think of a better way to limit really bad trades.