Menu items of draft posts are rendered

I have a section with a frontmatter defined menu item. The page is set to draft:

---
draft: true
menu:
  main:
    name: Shortcodes
    weight: 900
---

I would expect the menu item to NOT render, when compiling the page without drafts. It does though. Is this a bug or are there deeper thoughts behind this?

This content section is in a module, so having a development and a production menu configuration is not an option.