If he were trying to leave then he wouldn't be renewing. I think this is a sort of compromise committal.
We won't risk losing another high value asset on a free, like Dybala, but if the team doesn't get better in 1-2 seasons he has a way out.
It actually does make sense if he isn't trying to leave just yet but doesn't want to end up stuck in a failed project.