Run the route a yard deeper or got to the guy in the back of the end zone and there is no question. Don’t run a route short and expect the refs to bail you out. I can see a few reasons why they may have ruled this not a TD.
1. The ref does not believe the receiver has possession in the end zone, establishes it after leaving the end zone.
2. The ball never crossed the plane of the end zone.
3. A comeback route out of the endzone is not the same as a route going out through the endzone so is a bigger risk IMO.
I think they probably should have reviewed the play, but you can’t rely on the refs to bail you out as @CalGradUteDad says for poor clock management. Otherwise you’d see end of game routes with about :01 on the clock to the sideline in hopes of getting that extra second.