  We study systems in arbitrary space-time dimensions where matter, deformed by
$\mathrm{T}\bar{\mathrm{T}}$-like irrelevant operators, is coupled to gravity
in the Palatini formalism. The dynamically equivalent perspective is
investigated, wherein the deformation transitions from the matter action to the
gravitational one or vice versa. This alternative viewpoint leads to the
emergence of Ricci-based gravity theories, thus providing a high-dimensional
generalisation of the well-known equivalence between two-dimensional
$\mathrm{T}\bar{\mathrm{T}}$ deformations and coupling to Jackiw-Teitelboim
gravity. This dynamical equivalence is examined within the framework of the
recently introduced Lagrangian flow equation, which notably led to the
discovery of a direct link between Nambu-Goto theory and
$\mathrm{T}\bar{\mathrm{T}}$ in $d=2$, as well as significant insights into
nonlinear electrodynamics models in $d=4$. The investigation involves explicit
examples in $d=4$ dimensions; it builds upon earlier research concerning the
metric interpretation of $\mathrm{T}\bar{\mathrm{T}}$-like perturbations,
incorporates and extends recent findings in the cosmology-related literature
associated to the concept of reframing. We focus on scenarios where the
resulting modified gravity theories manifest as Born-Infeld and Starobinsky
types.
