Suppose a miner mined a block and the block was part of the best chain. He must have got his mining reward then. Now suppose that due to a fork sometimes later, the block that he mined is no longer a part of the best chain, i.e. that block is stale now. Would he then retain his mining reward or would it get deducted?
If the block he mined is no longer a part of the main chain, then his mining fee for that block would simply not exist on the chain. So the miner would not retain the fee, but it wouldn't technically be 'deducted' either. 'Deducted' implies that the system is reducing the value of the miner's account. Instead, the system just has a different UTXO set, which does not include those mining fees.