You do as you thought - you set a bool to see if the timer was already called.
Something like, to keep it simple:
var timer_already_called := false
func _process(delta: float) -> void:
if (not timer_already_called
and check_number_of_enemies_in_group() == 0):
timer_already_called = true
If you're worried that running a code like that every frame would hinder performance due to the counting of objects in a group even after you don't need it anymore, don't be: just order the conditions in the IF statement to check the variable first and count the group after.
(Since the IF is an AND statement, as soon as any condition returns false it doesn't need to keep evaluating the rest of the conditions - the end result is already false, so it won't cause any performance issue.)