Bitcoin Core hardcodes the Coinbase transaction as a single output. coinbaseTx.vout.resize(1)
By definition src/node/miner.cpp
// Create coinbase transaction.
CMutableTransaction coinbaseTx;
coinbaseTx.vin.resize(1);
coinbaseTx.vin(0).prevout.SetNull();
****************************************************
//Referring to the line of code below
coinbaseTx.vout.resize(1);
*****************************************************
coinbaseTx.vout(0).scriptPubKey = scriptPubKeyIn;
coinbaseTx.vout(0).nValue = nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
coinbaseTx.vin(0).scriptSig = CScript() << nHeight << OP_0;
pblock->vtx(0) = MakeTransactionRef(std::move(coinbaseTx));
pblocktemplate->vchCoinbaseCommitment = m_chainstate.m_chainman.GenerateCoinbaseCommitment(*pblock, pindexPrev);
pblocktemplate->vTxFees(0) = -nFees;
LogPrintf("CreateNewBlock(): block weight: %u txs: %u fees: %ld sigops %d\n", GetBlockWeight(*pblock), nBlockTx, nFees, nBlockSigOpsCost);
However, in the recent block 860062, the mining pool paid several remote miners directly in a coin-based transaction: https://mempool.space/tx/aff7c9b18666c0a51c66013642e24bfcb8b721a674e0f4ce3afa3004b55b0156
How does a miner create a coinbase transaction that overrides the defaults specified in the above Bitcoin Core code snippet?