No keyboard input in Firefox window; logging out and logging back in fixes it

My laptop’s keyboard input doesn’t work in Firefox. I can interact with Firefox using the trackpad, but not the keyboard. Keyboard input works in other applications. When I log out and log back in, keyboard input into Firefox appears to work. For what it’s worth, I noticed this recently in Fedora 41, but I’m using Fedora 42 Beta now.

How can I troubleshoot this further?

           /:-------------:\          billy@lemp13
        :-------------------::        OS: Fedora 42
      :-----------/shhOHbmp---:\      Kernel: x86_64 Linux 6.14.0-63.fc42.x86_64
    /-----------omMMMNNNMMD  ---:     Uptime: 1h 18m
   :-----------sMMMMNMNMP.    ---:    Packages: 7675
  :-----------:MMMdP-------    ---\   Shell: bash 5.2.37
 ,------------:MMMd--------    ---:   Resolution: No X Server
 :------------:MMMd-------    .---:   DE: GNOME 48.0
 :----    oNMMMMMMMMMNho     .----:   WM: Mutter
 :--     .+shhhMMMmhhy++   .------/   WM Theme: Adwaita
 :-    -------:MMMd--------------:    GTK Theme: Adwaita [GTK2/3]
 :-   --------/MMMd-------------;     Icon Theme: Adwaita
 :-    ------/hMMMy------------:      Font: Adwaita Sans 11
 :-- :dMNdhhdNMMNo------------;       Disk: 436G / 1.9T (24%)
 :---:sdNMMMMNds:------------:        CPU: Intel Core Ultra 5 125U @ 14x 4.3GHz [74.0°C]
 :------:://:-------------::          GPU: Mesa Intel(R) Graphics (MTL)
 :---------------------://            RAM: 5798MiB / 55807MiB

Is this Firefox from RPM or Flatpak?

If flatpak then try with the RPM version.