Numerical simulations of jet launching and breakout from collapsars