Prevent changing commit message when merging PR

We’re tracking the release scope by checking commit messages for ticket patterns of issue tracking tool.

We have a git hook that does not allow pushing any commit without the ticket being mentioned.

However, when we’re merging the pull-request to master branch, the developer is able to tune the commit message - and by accident, remove the ticket name - in that case, we’ll loose visibility of what tickets were released (we’re releasing from master branch).

Is there any way to disallow people to change the commit message when merging PR on GitHub?