Can you please clarify your question? Are you attempting to make a checkbox that can clear all checkboxes and also recheck all checkboxes by checking that one checkbox?
Also a checked input would be written like this:
<input id="editor-post-taxonomies-hierarchical-term-48" class="editor-post-taxonomies__hierarchical-terms-input" type="checkbox" checked value="48" />
You can do this:
$('div[aria-label="Asukohad"] input[type="checkbox"]').on("change", function() {
var element = $(this);
if(element.is(":checked")) {
// do nothing.
} else {
uncheckAll();
}
});
function uncheckAll() {
$('div[aria-label="Asukohad"] input[type="checkbox"]').removeProp('checked');
}