(defun switch-to-buffer (buffer-or-name &optional norecord force-same-window)
"Display buffer BUFFER-OR-NAME in the selected window.
WARNING: This is NOT the way to work on another buffer temporarily
within a Lisp program! Use `set-buffer' instead. That avoids
messing with the window-buffer correspondences.
The problem is https://github.com/kidd/org-gcal.el/blob/396a30cf256c8b32a69fd73a081364937b43a1c7/org-generic-id.el#L242 The call
switch-to-buffer
should beset-buffer
. To quote the emacs source: