Form elements removed during custom page render
How are you then using $output? Are you putting it into ['#markup'] in your build array?

If so markup content will strip all sorts out. So either you can put $form as a separate item in your build array and there's no need to run it through render()

Or you can use drupal's "inline_template" rather than #markup in the build array