Will lvl 50 dwellers generate caps while in the vault?

Solution 1:

You only get bonus caps for leveling up when the dwellers actually level up.

There are several other sources of caps (exploring the wasteland, selling gear, lunchboxes, bonus caps when rooms finish, etc) but once a dweller is level 50, you won't get any further level bonuses from them.

Solution 2:

No, you won't get any more caps from a dweller after they reach level 50. Their level gauge will be always full from then on, so even if they are working on a room that just produced resources, their XP won't go up, thus they will never level up again and you won't get caps from that dweller anymore.