Thank you for these answers.
I am doing something very similar to what you are saying.
I configured the FreeRTOS kernel through CubeMX and generate the project. Then I remove the CMSIS functions and use the native FreeRTOS apis.
Here is an interesting link that resume what I am doing:
https://jaywang.info/using-native-freertos-in-stm32-microcontrollers/