The Maharik writes that it’s common knowledge that the Rambam posits like the Talmud Yerushalmi even when the Talmud Bavli doesn’t infer that way. I always thought that the Bavli is more important even if it doesn’t fit so well.
There’s a major disagreement among the rishonim exactly on this issue. We must remember that the Rambam is actually one of those monumental poskim who “set” the rules, and accordingly is not “bound” by this “klal” accepted by many others (and today, even taken for granted) that the the Bavli generally supersedes the Yerushalmi. The Ra’avad (Hil. Kriat Shma 3, 6), often the anti-thesis of the Rambam, writes that the Rambam often relies on the Yerushalmi, and the Vilna Gaon (Orach Chaim 546, 5) also explains that the Rambam’s way in most (!) places relies on the Yerushalmi. How much more so, if there is an explicit (!) Yerushalmi conflicting a Bavli whose position is just inferred but not explicit, the Rambam will generally prefer the explicit Yerushalmi, as opposed to other rishonim who even then will generally prefer the “inferring” Bavli.