They dedicated massive amounts of resources to this over very long periods of time. This wouldn’t be possible at all even in somewhat less restrictive authoritarian states let alone somewhat democratic ones like Ukraine.
There is no way any government in Ukraine during economic turmoil of the 90s that decided to spend billions on developing nukes would’ve stayed in power.
So I still don’t see how is that in anyway relevant?