Your premise is flawed
Unlike for instance the Corinth Canal...
The Corinth Canal, not the Panama Canal
...the Panama Canal is not a gouge that runs all the way down to sea level.
The Panama canal runs over the Isthmus of Panama and requires lifting ships in the canal by about 26 meters above sea level.
Profile of the Panama Canal
Another bad premise is that you assume that the oceans would somehow end up at significantly different levels. There is no reason to assume that.
Also there is a slight flaw(*) in that you have completely underestimated the amount of work it would take to build a wall over many hundreds of kilometers to a depth of several kilometers.
But don't worry... you are not the only one that are underestimating the woes of building big walls. A potential future US president also cannot get it right. :D
(*) Read: a huge one... show-stopper in fact. ;)