Does it help to give the statements more weight with an !important flag?
@media (prefers-color-scheme: dark) {
.progress-bar { background-color: #2a2a2a !important; }
.widget-progress-bar.progress-bar-primary .progress-bar { background-color: #4CAF50 !important; }
}