The In-and-Out Burger in Kettleman City is a good stopping point when driving between SF Bay area and LA, especially if you’ve got some place to be and not sightseeing.
The very best place - IMO - and I travel this route up the 5 every other month - is the BBQ express at Harris Ranch - it is about 1/2 way between LA and SF outside of Coalinga.
Go inside the Shell Station and there is the Express BBQ in the back - their tri-tip or brisket and cheddar sandwiches can’t be beat. I also get their tri-tip taco salad which is always very fresh.
I travel with my dogs so this is a great place to stop - picnic table outside and a grassy area for the dogs.