The Russo-Japanese War shares many similarities to the Russo-Ukrainian War, except Imperial Japan behaved more like modern Russia…
Russia expanded further and further East despite assuring Japan they wouldn’t.
Japan increasingly felt threatened by this encroachment so as a last-ditch effort to avoid war they offered a compromise, but Russia declined it, in part, because they thought they could rely on Germany’s support who’d ostensibly offer it on moral grounds, but who really wanted to see them fight each other in order to advance their own geopolitical goals.
Japan sensing the West’s long-term desire to colonize/“civilize” them attacked first.
And then they attacked again.
And then despite having the upper hand, Japan turned to the US to mediate a deal in the hope of avoiding a war of attrition.
Enter: Theodore Roosevelt.
It is hard to fail, but it is worse never to have tried to succeed. — Theodore Roosevelt
In the end, Russia was forced to give up more land than they otherwise could’ve gotten had they accepted the original treaty.