They are allowed to withhold in this manner. This happens a lot in the last month of employment, as you are paying for a full month of insurance coverage from the last payroll checks due you.
Final checks for unpaid sick pay, holidays, etc. are considered non-payroll payments for these purposes. Since you did not agree when you enrolled to pay for insurance from these benefits, they are typically not withheld from the payment for unused vacation, sick pay, etc. And, since you are leaving their employ, making arrangements like offering to repay them once you start the new job is simply not workable. Former employees are very likely not to pay for such benefits after leaving a job.
You can't prorate your insurance coverage for September between your old employer plan and new one, either. The two companies aren't aware of the change in employment. You could defer enrollment in the new plan until October if that helps, but often enrollment must start in the new job when you start work. Insurance eligibility and all that. I suspect you have to enroll in all your employee benefits, like 401(k), cafeteria plan, etc. when you start the new job.
This is one of those costs of changing jobs. I suspect you could have two different insurers covering you for September, and if you need to make a claim, they would have to negotiate which carrier would pay for your claim.
Your former employer has to abide by your wishes, which is to have them withhold for health insurance until you don't work there any more.
I hope that clarifies things for you. Positive feedback, five stars please, is appreciated after review. I'mCustomer