Comma before while?

Solution 1:

Personally and for the sake of clarity, I would structure your sentence as shown below.

"Stick to your guns, Lola," he replied, happily, while pinching both of my cheeks.