There is a Harry Potter role playing game! It's called Harry Potter: Hogwarts Mystery and was developed and published by Jam City under license from Portkey Games.