The treatment of hexadecimal values is inconsistent. In most cases 0x-prefixed hex values are accepted and returned, but in some cases hex values may be accepted or printed without a 0x prefix.
For example, account sign-message prints the signature without a 0x prefix, and account verify-message will accept a signature lacking in a 0x prefix. There may be other instances that can be identified.