go into (1) Community Patch then search for "exploit" it'll pop up in one of the files, open the files in notepad and delete that line if you still wish to gift units to AI. I can't find the line now since I deleted it.
I understand it's super exploitable, but since I don't like crippling AI all that much I sometimes even gift units to friendly AIs losing a war pretending they are a "volunteer army" thing from HOI4.