After activating internal search tracking: Subfolder pages not tracked (Behaviour > Page)

We are running a search engine for medical organisations.

Some weeks ago, we implemented internal search tracking for our search engine result pages:

var searchterm = "Surgery";
var category = "Procedure";
var total = 1171;
_paq.push(['trackSiteSearch', searchterm, category, total]);
(function () {

Example SERP URLs: (var searchterm = "Berlin"; var category = "location";)

This did work like a charm. Unfortunately, we encountered a strange behaviour after activating the internal search tracking: Side-wide page tracking did not work any more for our search engine pages which were located in subfolders.

While SERPs like

were still shown in Matomo under

Behaviour > Pages

other SERPs in subfolders like

but also

disappeared from the pages overview. (Those queries were still tracked under Behaviour > Site Search)

From those of you having implemented an internal search tracking:
Can you validate this as a Matomo bug?

If that’s not a bug:
Any ideas how to solve this problem?