fix: prevent automatic tool execution after unsafe model finish reasons (#19066)