All that effort for nothing with 水の泡になる
The expression 水の泡
Literal Meaning
This expression literally translates as “to become bubbles of water”.
Usage
It might be used when something that was expected to succeed or had potential ends up being fruitless or completely undone. The nuance is generally one of disappointment or frustration, emphasizing the futility or the sudden disappearance of something that was once tangible.
After discovering who the murderer is, Conan explains why the murderer went after Ran. He pinpoints when Ran unknowingly discovered a vital clue. Although Fujimiya loses her memory of friends every Monday morning, she and Hase have become close enough that she feels comfortable around him when meeting him “for the first time” at school each Monday. Hase fears that progress will be lost during summer break.Examples
All that murder planning for nothing with 水の泡になる

Losing all that built-up friendship with 水の泡になる
