You don’t undermine a president’s ability to conduct foreign policy. You can criticize it, but you aren’t just hurting trump by doing these kinds of things. You’re hurting the office and future president’s ability to communicate with foreign leaders.
I don’t like rogue governments either, but Trump’s dialogues with foreign leaders should be executive privilege. It’s very easy to critique presidents greasing the wheels of diplomacy, just like when Obama was caught on a hot mic.