Abstract We study SU(4)-symmetric ultracold fermionic mixture in the cubic optical lattice with the variable tunneling amplitude along one particular crystallographic axis in the crossover region from the two- to three-dimensional spatial geometry. To theoretically analyze emerging magnetic phases and physical observables, we describe the system in the framework of the Fermi-Hubbard model and apply dynamical mean-field theory. We show that in two limiting cases of anisotropy there are two phases with different antiferromagnetic orderings in the zero temperature limit and determine a region of their coexistence. We also study the stability regions of different magnetically-ordered states and density profiles of the gas in the harmonic optical trap.