These nuclear weapons were not Ukrainian from the very beginning. Just like endless hydroelectric and nuclear power plants on Ukrainian territory were built by the efforts of the entire Soviet Union and, to no lesser extent, the RSFSR.
Modern Ukraine created nothing but a civil war in the East, and all Western countries, including Poland, just watched as Ukraine destroyed the pro-Russian Donbass. No one even remembered the Minsk agreements (which were largely shameful and disadvantageous for Russia). As a result, what should have happened happened.