the DefeatBoss macro just checks to see if ID 0x02 has been ticked(chapter boss quotes are typically 0x01, chapter boss quote is 0x02). So apply that ID to the death quote of the boss and it will know to end the chapter.
Break the macro down and look at it
#define DefeatBoss(offset) "AFEV 0 offset 2"
It's saying if at any point does ID 0x02 get ticked, immediatly ignore everything else and go to "offset"(which in most cases, you'd put Ending_event)
So give your boss's death quote the 0x02 ID and it should be fine.
just go to the location where you inserted it and copy+paste the data; if you don't have those locations then... event ID mod and chapter data editor will be your saving grace