Certified GKH Gardening Expert
Poor pollination. . When the flowers are not properly pollinated, the plant will reject the fruit while they are just a few inches long. Hot weather will definitely contribute to this. However, you can try hand pollinating your plants. This article will help with that: https://www.gardeningknowhow.com/edible/vegetables/squash/pollinate-squash-by-hand.htm
Also, since it is potted, make sure to water twice as much in high temps.
Mine did the same thing earlier this summer. Old timers said it was too hot and dry. May try planting them where they get afternoon shade. That's what I will try next year.