I set up a Moodle quiz with Stack questions under the following settings:
settings --> Question behaviour --> Interactive with multiple tries --> students may redo another version ...
The last option can be accessed only after pressing the "show more" button. It enables the students to attempt each question multiple times until they get the correct answer - all within the same attempt at doing the quiz.
The problem was that the synchronisation of the random seeds between different questions was broken once the students try to access the same question a second time.
You can see how it look's in the attachment. Ignore the fact that it is in Hebrew I think you can still clearly see what is happening there. There are three questions on that page all supposed to relate to the same two matrices A,B introduced in the first question (which involves only instructions no student input). Then on the second and third questions the student is asked to fill in A-B and A+2B. In the second question, even though the answer is correct it is evaluated as a wrong answer. This is because this is the second attempt at this question by the same student and the random seed has been broken. You can see in the response of the software that the matrices it has at this point of time do not even have the same dimensions.