The FLAMINGO project: baryon effects on the matter power spectrum