Salaam. I think the answer to this question strictly depends on what your long terms goals are. keeping the truck as long as possible ? Maybe then it’s worth the money to rebuild the transmission like new. The benefits in that case are a warranty on the rebuild and the knowledge that the internals are all new so it’s health and future reliability largely falls on you taking care of itWould you say that finding a used tranny from a salvaged car would be a better option than rebuilding/fixing the existing transmission?
Otherwise it could be possibly financially beneficial to do a swap, at least the initial cost is less than a rebuild. Thing about a swap is that the variables are how well the donor transmission was maintained throughout its life, how many miles does it have, and how much life does it have left in it. It could last you 100 miles or 100,000 miles.