3D printer ends print by sinking in to it and getting stuck
As can be seen from the G-code file, the head is instructed to travel to x=0, y=0 (G28 X0 Y0 is actually a homing instruction to home the head and label the position with zero X and zero Y). After that it powers off the motors (M84). 

From your picture, it looks like the head digs in the print without moving to the home position, so G28 X0 Y0  is not working (although you mention it tries to move while digging in?!?). That is strange as there is no instruction to lower the head. Please alter G28 to G0 so that it reads:

G0 X0 Y0


(or G1 X0 Y0 which does work and will instruct the head to move). 

The digging into the print could be explained by the weight of the head/carriage that cannot be held when the steppers are not powered anymore (as instructed by M84). When the nozzle is hot, the nozzle will then dig into your print.



Edit:

Now that I see your comment on another answer, your proprietary software may produce different G-code than Cura does, this could imply that your printer does not use a "standard" G-code interpreter or does not implement all G-codes.