How close to 5 kHz can I set the PWM frequency on an UNO pin 11?
No, you cannot have hardware PWM at 5&nbsp;kHz on pin 11 of an Arduino
Uno. The closest you can get is 3.92&nbsp;kHz. You get that by setting
the prescaler to&nbsp;8 and configuring the timer for phase correct PWM,
instead of the fast PWM mode usually used by GRBL. Your options for
getting 5&nbsp;kHz are to use either software PWM or change the pinout.

You can get a quite accurate 5&nbsp;kHz PWM signal on pins&nbsp;3, 9
and&nbsp;10. You can do software PWM at 5&nbsp;kHz on any pin, but this
is prone to have significant jitter, which your laser may well not like.