Unable to construct a correct raw transaction for bitcoin cash testnet
Bitcoin Cash does not use the original Bitcoin sighash scheme (which looks like what you're trying to do here).

Instead, it uses a variant of the sighash scheme that was proposed in BIP143 (which is used for Segregated Witness transactions in Bitcoin).