Because when Godot exports a game, it uses another binary which doesn't contain the editor and is compiled with optimizations. These binaries are in "export templates", which you probably have installed before exporting.
You already compiled your module for the editor. What you have to do is to also compile it in the export template you are using. I never did that myself yet, but you may find more info about your problem is this previous question: https://godotengine.org/qa/2044/export-problem-custom-godot-build
Basically I think you have to use this command:
scons platform=<your platform> tools=no target=release (platform is
x11 for linux and
windows for windows, I don't know for others)
And then copy the resulting binary at the same location as where your export templates are (.godot/templates (on Linux) or /AppDataRoaming/Godot/Templates on windows, maybe).