I think in one of the interviews larian said it was developed from the DOS2 engine, noting they have been working on BG3 for a little while.