But Germany found itself in a bind because they had burnt so many bridges. The building of a powerful fleet antagonized Britain. The annexation of provinces antagonized France. Note that both those things were done contrary to Bismarck's advice. Wilhemine Germany was unwilling to pay the price to gain future allies against Russia.
That was because Wilhelmine Germany had hegemonist intentions of its own. Their fear of Russia's modernization was not simply due to concern for their own safety. What they also feared was that Russia's modernization would render impossible Germany's own dream of European dominance. Hence there was a strong faction among the German leadership wishing to wage war to prevent Russia from becoming a modern state. They nearly succeeded.