For me the problem was caused because IntelliJ had duplicated (Test) Sources Root in Project Structure. It happened, because few days back I marked those folders as sources root manually to fix some issue quickly. It seems like after Maven re-import it merged the manual markings with the POM declaration. Manually removing those sources roots in Project Structure and re-importing the POM solved the problem, leaving only single entries for sources roots.
IntelliJ: 2024.1.1 (Build #IU-241.15989.150, built on April 29, 2024)