You can’t. Scheduling priority is fucked in all sorts of ways in CFS.
Nice just straight up has no useful meaning nowadays and the alternatives can’t really make a background process not significantly impact “foreground” ones either.
Best you can to is limit kow many cores a cgroup is allowed to use.