Hello!
This is already answered on our Discord community but I'll add my reply here for clarity:
With a minor change in the code, you can block all the providers for any booking and not only their bookings.
This is the Availability.php library in the get_available_periods, you will need to remove the id_users_provider filter while getting the provider appointments.