Thanks for providing such an interesting problem. I got a few questions after doing some analysis:
The Rubik’s cube is weird in terms of coloring. It has two same color blues adjacent to a white face. Correct me if I am wrong.
(Important) provided the range of x, y, z between 0-360, there will be at least two sets of angles that can lead to the same orientation of Rubik’s cube (indirectly the simulated image). This can be corrected by limiting one angle (pitch, y) in general to lie between (0-180). Even by correcting so, there will be a gimbal lock problem (https://en.wikipedia.org/wiki/Gimbal_lock#In_applied_mathematics).
Assuming I throw have an “oracle” supervision to do prediction, half of the time my answer will be wrong due to reason-2. Let me know if it is not the case.