I did some digging and this is what i was able to find that match your scenario, take a look: Firefox devtools broken with custom home-manager configuration - #3 by petafloppa this post also seems to have a temp solution thats somewhat effective by closing FF and deleting the sqlite db underneath.
Theres also some talk on reddit about it being correlated with the number of open tabs on FF at the time, Reddit - Dive into anything
A bug was also reported to nix github* as well around the same time by another guy with the same scenario, home-manager, FF refusing to show dev tools when prompted : bug: firefox: places.sqlite in profile getting corrupted · Issue #6083 · nix-community/home-manager · GitHub