Content representation broken since version 3.3.5

Last week I updated a kirby site from 3.3.3 to 3.4.3 and now my content representation doesn’t work anymore. the url …/events.json leads me now to a 404. but with kirby 3.3.3 it worked perfect.
I’ve tested a few different kirby versions and it breaks with version 3.3.5.
I couldn’t find any hint, of a breaking change. Does anybody else experienced this as well?

the events.json.php looks like this:

<?php

$data = [];

foreach($pages->children()->listed()->sortBy('date', 'asc') as $event) {
    $data[] = [
      'url' => $event->url(),
      'title'  => $event->title()->value(),
      'date'  => $event->date()->toDate('%Y-%m-%d') . 'T' . $event->time()->toDate('%H:%M')
    ];
}
echo json_encode($data);

Where are you calling this representation? Does it work if you just open it in the browser?

I just tested a content representation in 3.4.3 in the browser and that worked without issues.

Have you cleared the browser cache, and the media folder after updating? Or the page cache if you are using it?

Do you use any plugins that might interfere?