Then it will get the new library. Which, realistically, 95% of the time is OK anyway, since ABI compatibility typically means a newer version of a lib is OK if it keeps the same SONAME. (If it doesn’t, then the old file is gone and there’s nothing there to reload.)
In any of the cases where that’s a bad thing, the program will presumably crash. But years and years of live updates have reassured me that (at least) the standard desktop environment stack of GNOME services, mutter, X.org server, etc. clearly doesn’t do that, because they’ve never experienced a single problem.
Heck, if you install
python3-dnf-plugin-tracer, DNF will run a scan at the end of the upgrade run and offer you a report if it finds any processes with files open that were part of the transaction. That way you know which ones might theoretically hit problems, and should at least be restarted after the upgrade.
But, really, it already feels like this is all in the realm of upgrade-security theater.