I reported strange things with emacs earlier, but I thought it might be
something wrong with my partially configured system.
Nope, it is just plain busted. I've added this bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=2249379
I guess I'll have to try building from the fedora 38 source rpm
on fedora 39 and see if I can get a working emacs that way.