You can't use LFP batteries as a direct replacement in your UPS, no. The voltages and charge characteristics are different. What you can do is replace the UPS with a portable battery solution, like another poster suggested. I believe the Anker units are one of the few that can function as a UPS. Most sorta-can, but the key difference most of them lack is that they don't turn on automatically after fully discharging when the mains power comes back on. It's up to you if you need this particular feature.
Will Prowse on youtube I think has some videos comparing and contrasting the different units for this purpose.
Also, most of those power banks don’t switch between power sources fast enough to avoid causing problems.
That said, something I can confirm works on that front is getting one of those power banks, plugging the UPS in, and then plugging whatever into the UPS.
I had several days of uptime on Starlink that way, running it 10 hrs or so at a time on a battery bank, the remainder on a cheap generator.
I actually had a good experience replacing a lead-acid backup battery with an LFP battery in my garage door opener. I guess if the battery has an internal BMS and can accept charge at 52V, it might be enough?
Will Prowse on youtube I think has some videos comparing and contrasting the different units for this purpose.