First, how do we programmatically show a modal in BS5 (which no longer uses jQuery)? Like so:
const coolModal = new bootstrap.Modal('#cool-fricken-modal'); coolModal.show();
Now, let’s say you want to know if said modal is already open or not. Check it like this:
coolModal._isShown // true/false