When a real event or location, or even a real person, is used in a work of fiction but is modified to some degree to suit the needs of the fiction it is being used fictitiously. Thus in the majority of cases where this or a similar disclaimer is used in a work of fiction that includes people, places and/or events that have a real basis, the disclaimer is literally true.
But in anmy event, the disclaimer has little legal effect. It is not a statement made under oath, and even if it were a blatant lie, there would, be no legal consequences for making it.
My understanding (although I do not have a source at hand) is that the disclaimer dates to a case in the late 1800s where an author accidentally and unintentionally used the name of a real person as the name of a fictional villain, and was successfully sued for libel. It was believed that including such a disclaimer would prevent similar verdicts in future. Perhaps it would have in the legal climate of that time, I am not sure it was ever tested in court.
In modern defamation law, the plaintiff must show that the defamatory statement was "of and concerning" the plaintiff, that is that a reasonable person would consider that it was about the plaintiff. A mere accidental coincidence of names is not enough. And on the other hand, if the evidence clearly shows that the defamatory content was about the plaintiff, and would naturally be sio taken, a mere disclaimer will not shield the defendant from liability. At most it is an assertion of intention.
Thus omitting such a disclaimer altogether will not subject the author to significant additional risk, and on the other hand, including it will not subject the author to anuy negative legal consequences because it can be alleged that it is not strictly true.