@rafa21 No this is not related to flask this is much related to socketIO and Sanic version issue.
Can you please see this thread Rasa 3.0 error socket.io - #13 by nik202 and try update the versions for the mention packages, please take care of all the dependencies issue (red color) some can be rasa-sdk and some can be sanic.
@rafa21 If you still face some issue please let me know please.
Trick Suggested to check your code:
If you think that you have some issue with flask, you can create the new rasa environment and try install rasa and rasa-sdk to 2.8.1 respectively and then try run the rasa and flask. You will get the clear result. [please don’t perform this suggestion in current working environment for that please follow the above mention thread and suggestion] Thanks.
I wish this will solve your issue as earliest.