In about every case, if they are actually on duty, they won’t be in the restaurant. They will either be at their station or in their car.
But having said it, I would expect that in most cases most conscientious public servents would make a reasonable attempt to pay, at least after the fact, and many restaurant owners might make a gesture and say forget it. Can’t prove any of that however.

@josie I just know that occasionally, you will see a firetruck or an ambulance at an establishment and figured that if you were in the “official” vehicle, there was a good chance you were still on the clock.