When travelling overland from northern Croatia to Dubrovnik you must cross a small piece of Bosnia & Hercegovina which is not in the EU or EEA. Ensure your car (and other travel) insurance covers B&H and not just "EU/EEA countries".
There are ferries from the EU directly to the southern, detached, part of Croatia if you strongly wish to drive there and not leave the EU.