Game working better in the engine than when built

When I play the levels in the engine it runs smooth and fast but when I build it and start it it’s sluggish. There’s a huge a noticeable difference.
What might be causing it? I tried optimizing it in the system options and there’s no difference.

Thanks!