you need to add a loop that eventually sets flagowner to objnull if the flagowner dies after a certain amount of time, most use 120 seconds (2 minutes), then it will auto return. There are so many different ctf systems out there.
If you check on here i posted a complete ctf system, scripts, no triggers which will do as u ask, spend a few minutes searching for it