It's funny how making a charater with inconsistent maturity from writing issues can be made more consistent by just making them a mentor (Ben 10 Omniverse and Ninjago Dragons Rising)
Omniverse Ben has some of the most inconsistent writing ever when it comes to how much maturity he has from all of his experiences. But with the episodes where he teaches Ben 23, his maturity is more consistent than normal. The same is said about Kai from Ninjago Dragons Rising. Kai's maturity level is kind of all over the place, but having to train Wildfire brings out a lot of his character development and patience that he has learned over the years.
I think in general, characters who have been written inconcetly about their maturity and growth should probably teach/mentor someone who used to be immature like them. It brings the best out of their character growth and acts as a failsafe in case the writers have problems with consistently writing them.