Optimizing Dirac fermions quasi-confinement by potential smoothness engineering