I didn't notice this problem with macOS Sonoma 14.3 and also there is no problem with macOS Ventura. With macOS Sonoma 14.3.1 it's impossible to enter text in the headers and footers in Numbers. If a header or footer already contains text, the text can be deleted but anything typed afterwards doesn't appear.