You cannot outsource technology that is critical to your defense.
You either develop it on your own or you operate it along your allies.
Ukraine is in no military alliance, so Musk or not, it is consistently liable to the unreliability and whims of external providers, either public or private.
Which is why I'm very negative every time I hear European countries are renting from Space X instead of investing in common space technology. The day that somebody in Washington, or Dallas, decides to turn the switch off, you're off.