But why would you expect the A value to stay the same? Note that your base (as it's an offset base) is rotating and the tool is staying at a similar position in space, so the A value needs to change in order to compensate.
If you look at the code, adding A and E1 is always somewhere between -30 and -50 (in my version, I had to do some changes due to different components).
Further down it becomes -400, which is just negative -360 -40, so basically the same.
In your screenshot the added value is closer to 0.
If your robot is behaving differently, most likely it's not using an offset base that is rotating.