Workaround with C-style comments
For whatever reason.. this seems to work when you use C-style comments instead of standard SQL comments,
CREATE TABLE foo
AS
SELECT x AS id,
/* x AS id2, */
x AS id3
FROM generate_series(1,50) AS x;
Now you can do \e
and edit it.