Get in touch with your recruiter and get clarity as to when or how soon are you expected to join the job? And how far can the joining date be pushed if you are thinking about taking a break between jobs? You can (should) ask this question without mentioning anything about your current situation/dilemma or any plans whatsoever. Asking over an email is best. This question can be casually asked without revealing any details and ideally the recruiter won't ask any further questions.
Based on the estimated time required for paperwork, you'll likely get a clearance around mid-August. There's a likelihood that this will happen while you are on your planned holiday. The new company would expect you to join around mid September based on assumption that you'll need to serve a notice period of 1 month with your employer (plus a few extra days, if required for any movements/relocations).
Based on the response from the recruiter (from the first point), ask them if you can get an extension in joining date? If yes, how long the extension could go? If asked for a reason, you can state that there's a previously planned leave in the current job, and you can put in notice only after returning back from the leave.
Based on the interaction from the recruiter, you'll be able to determine if you can push the resignation date ahead till 18th September, so that you can claim the bonus. If not this lengthy, at least you'll buy some time, so you can still resign post-holiday on 27th August.
If the permissible joining date extension couldn't work out such that you can claim for bonus, you may have a make a call as to what is more important out of two, new job offer or the bonus.
If in the rare case, the recruiting company doesn't consent to extending joining date, you can take an appropriate call, plan ahead and resign before 10th August.
In case you are granted a brief extension, such as a couple weeks, make sure to inform your recruiter about your holiday and that you may not be in a position to reply to emails (regarding paperwork completion, if they happen to arrive during your leave), and request to complete any necessary formalities before 10th August or after 27th August.