For me, players gain XP for roleplaying, separate totals for each class.
I think of gaining Experience Points like picking up treasure, moving location, or beating a monster. Players choose to do these things, they don't have to. XP is the score of the game for each player. It's a measure of how well the players are roleplaying, if not necessarily how well they might be able to. If players don't want that score to increase, they may avoid attempting actions which they beleive increase it.