I've noticed a significant level of misunderstanding about this issue. At that particular point, resolving border disputes or bilateral issues shouldn't have been a precondition for EU membership. Otherwise, Cyprus would've never joined the club. Slovenia became an EU member state while having the same dispute with Croatia.
What changed in 2004 is that Slovenia's position became incomparably stronger (due to the accomplished EU membership) to the level of blackmailing and political extortion towards Croatia. What no one elaborates is that Slovenia's territorial aspirations were extremely irrational and completely out of proportion. For that reason, Slovenia had always avoided going to court.
What changed dramatically in 2005 is that Slovenia unilaterally annexed 234 sq km of the Croatian territorial sea in NW Istria (an increase of 130% compared to what they had presented in their documents when joining the EU) and additional 350 sq km of self-proclaimed so-called Exclusive Economic Zone, far away from Slovenia's coastal strip - categorically demanding Croatia's recognition of its territorial appropriations. This extortion attempt (which Slovenia had to legally nullify a decade later, in 2018) delayed the Croatian accession talks for about a year.
The Slovenes had to approve the solution of the territorial dispute by the ad hoc Arbitration in a national referendum in 2010. They did that narrowly by 51.5% which enabled Croatia to move on. But the Arbitration was entirely tailored in favour of Slovenia's aspirations. Later, they didn't play by the book and messed up seriously which allowed Croatia to reject the Arbitration altogether and join the EU practically "without" Slovenia's consent.
Ironically though, in the meantime, the so-called "High Seas" (the main Slovenian excuse for territorial demands) simply vanished in the Adriatic (due to EEZ jurisdiction extensions) making Slovenia's demands and wishes even more redundant and absurd.