It isn’t, though. Package layering modifies the install itself. See: https://docs.fedoraproject.org/en-US/fedora-silverblue/getting-started/#_flatpak_command_line
The big problem with the way ostree works is that installing things has side effects. Every item you install with ostree makes all future items slower to install, including regular os updates. This is a significant flaw in the way they designed it and really makes immutable oses less attractive.
That is a flaw. Flatpak is great where it works but Flatpak doesn’t solve all problems, neither does any one solution except os level modification. It can be a last resort by it should be a last resort that works. The layering system could be put together such that you don’t get side effects of installing packages like that. It might be tough to fix but that doesn’t make it not a flaw.