  Perovskite oxides are known to exhibit many magnetic, electronic and
structural phases as function of doping and temperature. These materials are
theoretically frequently investigated by the DFT+U method, typically in their
ground state structure at $T=0$. We show that by combining machine learning
force fields (MLFFs) and DFT+U based molecular dynamics, it becomes possible to
investigate the crystal structure of complex oxides as function of temperature
and $U$. Here, we apply this method to the magnetic transition metal compounds
LaMnO$_3$ and SrRuO$_3$. We show that the structural phase transition from
orthorhombic to cubic in LaMnO$_3$, which is accompanied by the suppression of
a Jahn-Teller distortion, can be simulated with an appropriate choice of $U$.
For SrRuO$_3$, we show that the sequence of orthorhombic to tetragonal to cubic
crystal phase transitions can be described with great accuracy. We propose that
the $U$ values that correctly capture the temperature-dependent structures of
these complex oxides, can be identified by comparison of the MLFF simulated and
experimentally determined structures.
