Suppression of giant planet formation around low-mass stars in clustered environments