The looping works on the immediate next questions without page breaks. If the questions that need to be looped are later i.e. not added right after then those questions can not be looped as of now.
As an alternative or workaround, you could use block looping that is available in Research Edition. You would need to add the question that needs to be looped in a different block and use block looping with the criteria based on the main source question.
Please refer this help file to know more about Block Looping: https://www.questionpro.com/help/block-looping.html