Getting the wrong txid for coinbase transactions
The txid is the hash of transaction without segwit data. The full coinbase transaction contains the segwit data which will result in the hash that you got. However that is not the txid.