You can hide the button outside service times or if no operator is available. You'll find this option in your Widget Editor under Chat > Advanced. You can adjust your service-times under Chat > Service-times.
This short video explains the steps in detail:
Due to recent changes, some parts of this article might not match what you see in the product today. We appreciate your patience while we work on updating this document.