I am talking about when using regtest or simnet modes.
For context, it is so that I can create coinbase transactions with reproducible txids.
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.Sign up to join this community
It is not possible to do this in Bitcoin Core. If you want to have control over the coinbase transaction, you will need to use external mining software that allows you to do that.
Since the difficulty on regtest is so low, you could have a simple python script that produces blocks with your specific coinbase. You don't need actual mining software as the difficulty is low enough to be found almost instantaneously with a naive mining implementation.