By default, Maple TA is configured to log out the user after 30 minutes of inactivity. Browsing through and answering questions, clicking on "Verify" etc. will reset it back to 30 minutes. The pop-up appears after 25 minutes of inactivity, clicking on "extend session" during the next 5 minutes will reset it back to 30 minutes as well. If the user is too late and clicks "OK" past 30 minutes mark, Maple TA will redirect to the login page. If one single question takes more than 30 minutes to solve on paper and causes Maple TA log out in the mean time, I would strongly suggest to split it up into multiple parts (multiple questions or multiple verify sections within one single question). Not because of the logout issue, but because it will give you a better insight on the student's ability and provide you with more flexibility on partial grading.
The way I would diagnose this is by editing the moodle code to print out the http packet that you get back from TA. It will be sending correctly from TA but I think at some point the packet is being changed on its way to moodle. The best way to check this is to print it out in the packet in the service.php file on the moodle server - this is the place the grade gets sent to - http://localhost:8888/moodle29/mod/lti/service.php. Of course this means you need access to a non-production version of moodle to test. Part of the problem is recreating this problem on a server where you have diagnostic control.