It is not a bug, but something probably strange enough to be reported (or probably I misunderstand something).
If I compile qt-everywhere-src-6.2.2\qtdoc\examples\demos\hangman example from sources the following files are generated by MOC:
and the following file is generated by qt_add_qml_module:
Source file moc_inapppurchasebackend.cpp includes its header as follows:
but hangman_qmltyperegistrations.cpp includes it differently:
and it looks strange to me.
IMHO qt_add_qml_module should include the headers in the same way the MOC does.
probably inputFile attribute in moc_inappproductqmltype.cpp.json should be updated or some new attribute with the relative path should be added.
I discussed this on the forum first and then reported here.