jqGrid filterToolbar Searching not excluding hidden columns

I am using jqGrid [3.7.1] and on that using below code to hide some columns

jQuery("#gridId").jqGrid('hideCol', ["Col5", "Col7", "Col9"]);

And we also have filterToolbar applied but when we are executing search , I can see that it’s searching on different/hidden columns.

On inspecting I can see that TH under TR with class ui-jqgrid-labels for hidden columns display: none; style attribute gets added.

But for same column TH under TR with class ui-search-toolbar noting gets added and resulting in

<td role="columnheader" class="ui-state-default ui-th-column ui-th-ltr">
  <div style="width:100%;position:relative;height:100%;padding-right:0.3em;">
  <input type="text" style="width:100%;padding:0px;" name="Id" id="**gs_Col5**" value="" spellcheck="false">
  </div>
</td>

Where actual column header under Col6 and Col5 is hidden.

Any idea how to resolve it?