I've also noticed that there is a different behaviour when comparing the execution of same version of OneDrive, for the same account, using Big Sur (CPU issue) and High Sierra (no CPU issue).
I used dtrace to get the system calls performed by OneDrive and the infinite loop is only verified in Big Sur, with more than 3.000 calls per second to workq_kernreturn. The 100% CPU issue is result of this infinite loop:
sudo dtruss -p <OneDrive PID> -o
...
0 workq_kernreturn(0x100, 0x70000D1FCB80, 0x2) = 0 -2
0 workq_kernreturn(0x100, 0x70000D1FCB80, 0x2) = 0 -2
0 workq_kernreturn(0x100, 0x70000D1FCB80, 0x2) = 0 -2
0 workq_kernreturn(0x100, 0x70000D1FCB80, 0x2) = 0 -2
0 workq_kernreturn(0x100, 0x70000D1FCB80, 0x2) = 0 -2
0 workq_kernreturn(0x100, 0x70000D1FCB80, 0x2) = 0 -2
...
/* workq_kernreturn commands */
#define WQOPS_THREAD_RETURN 0x04
/* parks the thread back into the kernel */
#define WQOPS_QUEUE_NEWSPISUPP 0x10
/* this is to check for newer SPI support */
#define WQOPS_QUEUE_REQTHREADS 0x20
/* request number of threads of a prio */
#define WQOPS_QUEUE_REQTHREADS2 0x30
/* request a number of threads in a given priority bucket */
#define WQOPS_THREAD_KEVENT_RETURN 0x40
/* parks the thread after delivering the passed kevent array */
#define WQOPS_SET_EVENT_MANAGER_PRIORITY 0x80
/* max() in the provided priority in the the priority of the event manager */
#define WQOPS_THREAD_WORKLOOP_RETURN 0x100
/* parks the thread after delivering the passed kevent array */
#define WQOPS_SHOULD_NARROW 0x200 /* checks whether we should narrow our concurrency */