Imperitiam meam in orbem spargo (I spread my incompetence to the world).
TL;DR: don't use ".h5" or ".hdf5" extensions.
(Tested on TensorFlow 2.12.0)