This. A pitcher is on the hook for the loss if he gives up the go ahead run(s), which I assume is the case with Lilly. A pitcher is no longer on the hook for the loss if his team comes back to tie the game or take the lead.
Maybe it's better if I give an example:
Lets say Pitcher A pitching for Team A allows 2 runs and leaves his team down 2-0. He is currently on the hook for the loss. Then let's say Team B scores 4 more runs, making the score 6-0. Then Team A battles back and scores 4 runs, making the score 6-4. Pitcher A is still the pitcher of record because, while Team A got his 2 runs back, Team B extended its lead before that happened.
On the flip side, if Pitcher A leaves with a 2-0 deficit and then Team A ties it at 2, Pitcher A would get a no-decision.
You didn't give us enough information to determine whether this is the case, but I highly doubt that there was any mistake because, in my five years playing The Show, there has never been a problem.