This work presents the first Bayesian inference study of the (3+1)D dynamics of relativistic heavy-ion collisions and quark-gluon plasma viscosities using an event-by-event (3+1)D hydrodynamics+hadronic transport theoretical framework and data from the Relativistic Heavy Ion Collider Beam energy scan program. Robust constraints on initial state nuclear stopping and the baryon chemical potential-dependent shear viscosity of the produced quantum chromodynamic (QCD) matter are obtained. The specific bulk viscosity of the QCD matter is found to exhibit a preferred maximum around sqrt[s_{NN}]=19.6 GeV. This result allows for the alternative interpretation of a reduction (and/or increase) of the speed of sound relative to that of the employed lattice-QCD based equation of state for net baryon chemical potential μ_{B}∼0.2(0.4) GeV.