Unfortunately, it always goes to the first page of one, which is quite difficult with a larger number of messages, since you have to click further from there.
It would make sense to jump back to the page from which the detailed view was accessed.
To do this, the template of the detail view must be edited, which ideally is saved in your own site package so that it is not overwritten when updates are made. To do this, open the 'Detail.html' file and locate the area that contains the condition for the backlink. It is marked with the comment !-- Link Back --.
Since the whole thing is to be solved via a jacascript, the entire 'link-page' viewhelper is removed, while the 'translate' viewhelper remains and is replaced by a normal link that calls a corresponding javascript
<a href="javascript:history.back();" title="Zurück zur vorherigen Seite">
<f:translate key="back-link"/>
</a>