IMO, it really depends on the situation. For example, if you’re coming to an intersection with a left-turn lane, it’s often safer to be in the left-turn lane than to try to turn left across traffic from the right shoulder. If there’s a right-turn lane and you’re going straight, the right side of the straight lane may be a better option than the right shoulder.
There are lots of variables: lane design, traffic density, traffic speed, etc.
I do try to stay on the right edge of the lane and hold a good line so cars can get by.