I’ve had this issue for years, and it’s related to the text input box in the “Project Rate (Hz)” gadget in the bottom left corner.
I can enter any number with the keyboard except the number 8 and 9. However, it works as it should if I use the number keys on the numpad instead.
I’m on Windows 10 Pro x64, and I use Audacity 2.4.1. I use a Norwegian keyboard layout (desktop keyboard), but there shouldn’t really be any differences for non-modified number keys in that layout in comparison to the US layout.