I think you're confusing compensation for loss of a QO player with the penalty for signing a QO player.
Both of these depend on the club's revenue sharing / luxury tax status.
If a club is a revenue sharing recipient (for instance, the Diamondbacks), the compensation for losing a QO player (Zac Gallen) is a pick before the competitive balance A round - just after the regular first round. The penalty, if the Diamondback sign a QO player, is loss of their 3rd pick.
If a club is neither a revenue sharing recipient, nor a luxury tax payer (say, the Cubs), the compensation for loss of a QO player (Kyle Tucker) is a pick after the competitive balance B round - after the regular second round. The penalty for signing a QO player is loss of their 2nd pick.
If a club is a luxury tax payer (the Phillies), the compensation for losing a QO player is a pick after the fourth round; the penalty for signing a QO player is loss of the 2nd and 5th picks.
Note that in all these cases, the penalty picks lost are the 2nd, 3rd, or 5th overall picks the team has - not necessarily the picks in those draft rounds. So a club that is a revenue sharing recipient (Arizona) might have a first round pick, a compensation pick prior to the Competitive Balance A round (for losing Gallen), then a pick in the Competitive Balance A round. If the D-Backs then signed a QO player, they would lose their 3rd pick - the pick in the Competitive Balance A round.
Yeah... it gets complicated!