Are two videos "identical" if their decoded data is the same, but not the encoded data?
If the hashes for the decoded streams are identical, then the streams are essentially identical.
Differences can be due to bitstream encapsulation (Annex B vs length-prefixed in case of H.264/H.265) or packet arrangement or embedded parameter sets (for configuration). As long as the bitstream is valid, these differences won't affect decoding.