The UK does not have to join an EU army
Article 42 of the Lisbon Treaty states that a “common defense” (an EU army) would require unanimous approval from EU member states, and in UK law this can’t happen without a referendum. So as long as we’re in the EU, not only would we not have to join, we can prevent it happening altogether.
Once we leave the EU we get no say in whether or not an EU army is formed. How does that make us safer?