One solution I haven't seen yet is using something similar to The Shadow of Yesterday's Keys where you get XP for roleplaying certain personality traits, flaws, etc.
5e doesn't directly link XP to roleplaying, but it does have Inspiration, which is something I think DMs (at least on ENWorld)...