Leave it till either the plant withers and dies or the frost arrives. As long as the plant is growing so is the squash. There is no advantage to pulling it early if you are storing it. Thge longer it it left the better chance it has of being fully mature.
Weather permitting, here and in the UK ideally I would not pull mine till late September or early October.
XX Jeannine