This is extension removes the ability to like (or unlike) posts on a locked discussion.
There are no settings. Just enable the extension in the admin panel.
About restricted tags (tags that have custom permissions): Due to a limitation in Flarum, this extension must be enabled before the Tags extension in order for the lock to apply in restricted tags https://github.com/flarum/core/issues/1832
composer require clarkwinkelmann/flarum-ext-lock-likes