After more investigation: It is only the video feed that offsets, nothing else. Running the program in Processing itself seems fine… the code ran for weeks without offsetting. Also, we managed to catch the offset on camera and it happens nearly instantly (i.e. it doesn’t slowly slide up, it just jumps to a seemingly random position any point from a few minutes to a few hours after the exported app begins).
As such we can use the workaround of running the code in processing for now but I would be very grateful if anybody has any ideas for a less clunky fix.