In multiple episodes it is stated that Rick left Beth when she was a child. So going to the 1st episode of the 3rd season, Rick’s fabricated backstory about him creating the portal gun featured Beth as a child.
Which would make sense that he discovered inter-dimensional time travel around the same time he left Beth and his wife.
A friend of mine has his own theory where the fabricated origin story actually did happen and that that was the first time Rick jumped into another dimension. A dimension where Diane and Beth were still alive.
Just like he did with Morty in Rick Potion #9 (Se01Ep06).
And that while living with them he was afraid that similar events would happen to them again, so he left.
But I think that that theory isn’t complicated enough for the walking complex that is Rick Sanchez. I think that we can dig deeper into his fabricated origin story.
Cornvelious Daniel said that you can’t alter the details of a memory, which is true.
But at the same time, let’s be honest, you can’t come up with something that traumatizing on the spot if you haven’t thought about it beforehand.
So I honestly think that the fabricated backstory contains one of Rick’s worst fears that involves Diane and Beth. (And that would make sense that his worst fear would involve Beth as a child, because those are pretty much the main memories Rick has of her before he came back into her life as an adult)
Because he knew that once he created the powerful portal gun, he would become the most wanted man in any dimension, putting his wife and child in danger.
So he left them to keep them safe and made it appear like he was abandoning them so that they wouldn’t try to look for him. Kind of like how he turned himself in to the Galactic Federation during The Wedding Squanchers (Se02Ep10).
In conclusion, I think that his fabricated origin story was more of a compilation of deep fears justifying why he “lost” both Beth and Diane because of his creation of the portal gun rather than just a bullshit story to distract the Galactic Federation.