I'm Using Qt 6.5.2 and had the same issue and after an hour of digging and testing all your solutions i did some digging on the build folder and i saw this:
in <QBuild_Dir>/<cmake_project_name>/<module_name>_qml_module_dir_map.qrc
<RCC>
<qresource prefix="/">
<file alias="/<<<cmake_project_name>>>"><<<QBuild_Dir>>>/<<<cmake_project_name>>></file>
</qresource>
</RCC>
so there is an alias for the resource!
to use the resource on my C++ code i had to add it to the beginning of the resource path like
before:
":/assets/img.svg"
after
":/<cmake_project_name>/assets/img.svg
and it works 👌