Keep custom fix in a plugin

As @kero noted, your best option is to contact the developer and ask if they are open to including an appropriate hook – what you need is a filter to allow customization for the value of $allowed.

However, barring that, one potential (albeit not perfect) solution is to ignore updates for the plugin. You can do that as follows:

function filter_plugin_updates( $value ) {
    unset( $value->response['some_plugin/some_plugin.php'] );
    return $value;
}
add_filter( 'site_transient_update_plugins', 'filter_plugin_updates' );

Then you would not get update notifications or automatic updates for the plugin. That would allow you to re-apply your change manually to the update and handle things manually.

Obviously, if you can get the developer onboard with a filter hook, you’re better off. But if you’re handling things manually, this keeps you from blowing out your customization unintentionally.