It's a longstanding limitation enforced by the IDE:
https://youtrack.jetbrains.com/issue/IDEABKL-6745 Source paths, including resource paths, can only belong to a single source set or module. A workaround I've used is to symlink the path for the other source set, but the downside is the source files will show up twice in indexes and search results, including the original and symlinked locations.