Why is KNN better at K-Fold Cross Validation than XGBoost or Random Forest?
It's not that KNN is better at k-fold cross validation.
Its just that KNN doesn't do any training apart from storing a footprint of the training data within the model.
KNN's logic resides in its inference step i.e. the predict() call where it determines the k nearest neighbors for the newly supplied instance from previously supplied training data and makes a prediction for the label.
So it's likely that KNN is faster than most other models for small to medium sized datasets.