In your implementation of the script interpreter, hashing opcodes pop a stack item, convert it to a string and then hash it. However, in Bitcoin the stack items are always byte arrays, and interpreting them as strings results in inconsistencies.
For example, the script OP_0 OP_SHA256 should return the hash of an empty byte array, but it instead hashes the string "0".
In your implementation of the script interpreter, hashing opcodes pop a stack item, convert it to a string and then hash it. However, in Bitcoin the stack items are always byte arrays, and interpreting them as strings results in inconsistencies.
For example, the script
OP_0 OP_SHA256should return the hash of an empty byte array, but it instead hashes the string "0".