They are for a different job and can't really be compared. Phaser is a solely Canvas or WebGL browser games framework and does a really good job at that. If you just want to make browser games pick Phaser.
If on the other hand you want the option to build for desktop or mobile and other platforms try Unity. Why not pick Unity from the start? It supports building in WebGL but you can't really delve in that automatically generated javascript code to fix something in there and even if you tried to do it you would have to do it every time you build your game. You just have to trust that Unity will keep up to date its framework and its build system will optimise it as best as it can.
Also with Unity you trust your art and music to its packaging system. You can change some of the import options, but in the end you depend on its optimisations.