In the phrase be busy doing something, doing is a verb in the -ing form. It tells us what the person is busy with.
For example:
• She is busy cooking dinner. (cooking dinner tells us what she is doing.)
“Grammatically speaking, what function does "doing" have in this phrase?”
Tip: When asking about grammar, phrases like what function does… have or what role does… play sound more natural than what does… work as.