I installed several H5P content types and I ask myself where this content is installed. When plugins are installed and you want to upgrade Moodle, you need to copy the plugins to the new version of Moodle (without git pull). Is this copy action also necessary for the H5P content types when you want to upgrade Moodle?
It is a long story, can't remember all the details. See whether this sticky post (and the subsequent discussion) in the H5P forum brings you closer to the answer.