We use relativistic hydrodynamic numerical calculations to study the interaction between a jet and a homologous outflow produced dynamically during binary neutron star mergers. We quantify how the thermal energy supplied by the jet to the ejecta and the ability of a jet to escape the homologous ejecta depend on the parameters of the jet engine and the ejecta. For collimated jets initiated at early times compared to the engine duration, we show that successful breakout of the forward cocoon shock necessitates a jet that successfully escapes the ejecta. This is because the ejecta is expanding and absorbing thermal energy, so that the forward shock from a failed jet stalls before it reaches the edge of the ejecta. This conclusion can be circumvented only for very energetic wide angle jets, with parameters that are uncomfortable given short-duration GRB observations. For successful jets, we find two regimes of jet breakout from the ejecta, early breakout on timescales shorter than the engine duration, and late breakout well after the engine shuts off. A late breakout can explain the observed delay between gravitational waves and gamma rays in GW 170817. We show that for the entire parameter space of jet parameters surveyed here (covering energies $\sim 10^{48}-10^{51}$ ergs and opening angles $\theta_j \sim 0.07-0.4$) the thermal energy deposited into the ejecta by the jet propagation is less than that produced by r-process heating on second timescales by a factor of $\gtrsim 10$. Shock heating is thus energetically subdominant in setting the luminosity of thermally powered transients coincident with neutron star mergers (kilonovae). For typical short GRB jet parameters, our conclusion is stronger: there is little thermal energy in the cocoon, much less than what is needed to explain the early blue component of the kilonova in GW 170817.