SET-BACK tool issues with offset

I’m Trying to create a Building zone boundary set tool. Basically you can import any 4 point shape with setback parameters and it will show the building space/zone. My issue lies in for one shape my script works however for another shape it doesn’t as the lines are not towards the centre (As seen in photos).

I’ve tried multiple ways however really stuck and always come back to my original script. Happy to upload script too if needed.

did you try using Clipper for offsetting?