It is not a gray line, what happens is that many companies tolerate it, but if they wanted to, they can remove your fan-game and legally they have the right and there is nothing you can do to defend your work.
If it really was a gray line, you could go to court and expect to win and that doesn't happen.
Companies like "Harmony Gold" every time a fan project becomes notorious, they knock it down.
Companies like Capcom have unofficially said that they have no problem with fan-created content, as long as it is respectful.
Companies like Sega have closed projects, etc.
In the case of itch. The rules say that you must have the rights or permissions to all content you upload, but this is not enforced.
You can upload a fan game, but if the owner of the content files a DCMA, Itch will remove the game, don't hesitate.
Maybe you are confusing "fair play", where it is legal to use content that you do not own or do not have authorization for, but a fan-game does not fall into that definition.
Edit::
Examples:
https://www.wired.com/story/sega-shuts-down-streets-of-rage-remake/
https://www.gameinformer.com/b/news/archive/2010/03/02/fan-made-king-s-quest-seq..