That is also ok, but you need to make sure that the ownership of the pointer is clear.
Either make sure that each model has a parent, or use QQmlEngine::setObjectOwnership() to use the ownership to C++ on the pointer before returning it.
Could you elaborate more on how to achieve this?

As currently, i'm using the invokable method to return the model. The model is updated when menu model has changed. After some changes the app crashes with the error "Second Chance Assertion Failed: File f:\dd\vctools\crt_bld\self_x86\crt\src\dbgdel.cpp, Line 52".

This is caused by the problem you mentioned
Otherwise QML will delete/garbage collect the model when it doesn't need it anymore and your C++ code might not like that
Can you suggest how to handle this?