She was absorbed in her work.

Literal

She [topic-は] work [target-に] absorbed had-become.

夢中になる ('to become absorbed, engrossed, infatuated') is a fixed verbal idiom built from 夢中 ('in a dream, lost in') + になる ('to become'). The image is striking: being so caught up in something that one is metaphorically 'inside a dream.' The に on 仕事 marks what one is absorbed in — the target of the absorption. The progressive past ~ていた marks the absorption as an ongoing state in the past.