I’m converting a tub/shower into shower. Attached pic shows current plumbing setup. Should I cut existing pipe before elbow and replace with horizontal 45 deg elbow then straight pipe to P trap to meet code (see pic)? Also, why is a 2 inch drain pipe required When we haven’t had any clogging/draining issues when using the shower? I was just planning on cutting vertical pipe above P-trap to lower the drain hole and plug the overflow pipe above. Thanks.
Your plan sounds fine. The trap is in the wrong location, so you need to remove it. Maintain proper slope and you're all good.
2" pipe is required for showers without tubs to be sure they don't overflow. Tubs have storage capacity and overflow circuits, which provide some measure of safety. If that's a problem, ask your inspection office for a variance. If it's not being inspected, cross your fingers. It'll probably be fine if you have good venting.