When Samson encountered the lion, he was an adult, and had asked his father to obtain a Philistine wife for him.
Samson went down to Timnah and saw there a young Philistine woman. When he returned, he said to his father and mother, “I have seen a Philistine woman in Timnah; now get her for me as my wife.” (Judges 14:1)
Samson’s parents were disappointed that their son wanted to marry a Philistine woman because the Israelites were prohibited to marry the peoples of Canaan (Judges 3:5-6). The New International Version Study notes make these comments:
As the head of the family, the father exercised authority in all manners, often including the choice of wives for his sons.
Given that Samson was old enough to marry, then there is no reason why he and his parents had to be joined at the hip. Samson was an adult (a headstrong one at that) who did as he pleased.
After the incident with the lion we learn that Samson then went down to talk with the woman he wanted to marry. In all probability Samson’s parents were with the woman and her parents, negotiating the marriage contract, and then Samson joined them.
As a matter of interest, the account in Judges 14:4 informs us that Samson’s parents did not know that God was behind these events:
His parents did not know that this was from the LORD, who was seeking an occasion to confront the Philistines; for at that time they were ruling over Israel.
The NIV Study Bible makes this observation:
The Lord uses even the sinful weaknesses of men to accomplish his purposes and bring praise to his name.
To answer your question, Samson’s parents were not supposed to be there with him when it happened. Where they went is of no consequence because Samson was a grown man. It is likely that Samson’s parents were in the company of the parents of the bride to be.