Should Trump lose I don’t think that makes Cruz a shoe in for 2020.
He could still face Walker, Rubio and others to emerge.
Considering that, he would be better politically to endorse Trump.
Honestly, I just do not see a path forward for Cruz regardless of what he does from this point.
His only shot would be to not only endorse, but to campaign tirelessly for Trump for now until the general. If Trump will have him.