the party with a sitting president who is challenged seems to always lose
LOL .... you really didn't type that did you? It is equivalent to saying a coin has memory of previous tosses ... all I can say is you would not do well in a probability/statistics course, if you believe that to be a meaningful statement.
History has shown it to be true. I gave you examples of a sitting president, Truman, LBJ, who withdrew due to being challenged, Carter and Bush who lost in the general election after fending off challengers in their own party. All 4 were challenged in their respective party's primaries. For Truman, Stevenson lost to Eisenhower, Humphrey lost to Nixon, Carter to Reagan and Bush to Clinton.
This is why the party of a sitting president goes to extraordinary lengths to avoid any one challenging their sitting president. Will that always hold true, who knows. But history hasn't been kind when a challenger challenges a sitting president in their party's primary.