Propagation of ultrahigh energy cosmic rays in extragalactic magnetic fields: a view from cosmological simulations