Yes @ geometry dash 3d, that behavior in Issabel PBX (since the release with Asterisk 16.16) comes from the reindexing query executed when a time condition is deleted.
By default the module runs:
$results = sql("UPDATE timeconditions SET timeconditions_id=timeconditions_id-1 WHERE timeconditions_id>\"$id\"","query");
This renumbers all higher IDs, which breaks references in other modules that still point to the old IDs.
Your workaround is correct: commenting out that SQL line in:
/var/www/html/admin/modules/timeconditions/functions.inc.php
prevents the automatic reindexing, so existing time condition IDs remain unchanged, avoiding call-flow mismatches in modules that reference them.
Just note that after this change, deleted IDs will remain unused (gaps in numbering), which is generally harmless and safer for systems with complex call flows.