How is it possible that these two encryption functions yield the same result?

I opened this post in stackoverflow some time ago where I explained a problem I had about not finding a way that would allow to successfully get the result of a string encrypted with a "aes-256-cbc-hmac-sha256" algorithm.

As seen in the answer, the encrypted string is exactly the same as it had been encrypted with just a "aes-256-cbc" algorithm, I could get advantage of that to successfully do a proper decryption.

Out of curiosity, I'd like to know how something like that is possible. I don't know much about criptography, but, on general terms, I know how all the functions involved in the algorithm work... And, by no means, I see that they could offer the same result, as it happens.

Why are these two different functions yielding exactly the same result?

The output is 64 Base64 characters without padding chars, corresponding to a $$(64 / 4) * 3 = 48$$ ciphertext in binary. The plaintext is 43 characters/bytes. There is no way that the ciphertext includes the authentication tag of 32 bytes (256 bits, the output size of SHA-256). No, the plaintext is just padded with an additional 5 bytes using PKCS#7 compatible padding and then encrypted... and that's it.