Welcome to the Bunnings Workshop community @Jennyw. It's great to have you join us and many thanks for your question.
It would be helpful if you could share an image of the gap created due to the walls not being square. That would allow our helpful members to better understand the issue and offer some great solutions.
We look forward to seeing some images and assisting with your project.