The way to keep it in homebrew is to either start signing librewolf builds or provide an alternative tap from Librewolf’s repo. One of the catalysts for the deprecation is that installing unsigned apps seems to only work in Intel-based macs and Apple has decided macOS 26 will be the last release that will support this architecture.
The --no-quarantine flag might be deprecated. There’s a discussion on homebrew github about disabling it, as Apple is closing the door on unsigned apps: https://github.com/Homebrew/homebrew-cask/issues/170345#issuecomment-2030021717