Replay attacks: can a coinbase transaction be replayed? I'm pretty sure that I understand how replay attacks work:
A malicious node takes a valid transaction from chain A, and replays it on chain B. Other nodes on chain B see the transaction as valid and therefore it is included in both chains, instead of just A.

My question is whether the first transaction in a block, that generates new bitcoins, can be also replayed.
Short answer: No.

Longer answer: depends on the rules of the B chain.

A coinbase transaction creates coins out of thin air, but is typically only valid if the block itself is valid. Typically if the block is valid on chain A it's not valid on chain B: because a block usually points to it's previous block, which should be on the same chain.

On the other hand, the rules of B chain can literally be anything, as crazy as the creators imagination allows. If the B chain is specifically designed to also allow A blocks, then the answer would be yes. But the coins would still belong to the miner, so it's hardly an attack.