This isn’t true, if you’ve made an account with the 401k provider then you still maintain agency over your investment portfolio after leaving your job.
I wouldn’t say leaving it is “bad”, but it may not be as advantageous as rolling it into your new employer’s plan.