V9: how to make tooltips work in block edit form

I had this working in v8:

<?php
echo $form->label('my_label', t('My Label') . '<i class="fa fa-question-circle" data-toggle="tooltip" title="Tooltip Title"></i>');
?>

<script type="text/javascript">
$(function() {
    $('body').tooltip({trigger: 'hover', selector: '[data-toggle="tooltip"]'});
});
</script>

I’ve changed the ‘data-toggle’ to ‘data-bs-toggle’ in v9. But no tooltip is shown.

What else should I do to make them work in v9? Tooltips work in the block view, but not in the block edit form.

I’ve looked at the Page List block form and instead of using data attributes adding a class ‘launch-tooltip’ has fixed the problem, tooltips work now.

However using tooltip attributes in the view makes them pop up instantly, using the class takes about 1-2 seconds. But it’s the opposite in the edit form, using the class is instant while using the attributes doesn’t even work.