The San Francisco 49ers invested heavily in Trey Lance in 2021. But things could have turned out much differently.