I’m facing the same issue consistently with Whooshkaa URLs, for example: https://player.whooshkaa.com/episode?id=330009
Viestit paikassa Stack Overflow
If your theme has a searchform.php, you’re probably hitting Ticket #16541: get_search_form() ignores $echo if searchform.php exists.
Your workaround is fine if you’re just echoing the search form anyway, but if you need to capture the output in a variable, you can work around this with output buffering:
<?php ob_start(); get_search_form(); $my_search_form = ob_get_clean(); ?>