This is caused by some buggy emulators so you must to use a newer version or another emulator to fix this issue that prevents doors from opening in the game.
Amiga
This bug is present in WinUAE up to version 0.8.17 Release 2. The bug was fixed in WinUAE version 0.8.17 Release 3 and later. Many thanks to Steve B. who convinced Toni Wilen (one of the WinUAE developers) to look into this door opening bug. See the discussion here about this issue and the fix for WinUAE.
Macintosh
This bug is present in the older, regular version of Basilisk II emulator. You can use Basilisk II/JIT where this bug was fixed.
This bug is present in the Mini vMac emulator up to version 36.04 and was fixed in version 37.
Background information
The UAE source code for emulating the 68000 family of processors contains a bug regarding the management of the N and Z processor flags for the bit field instructions (8 instructions added in the 68020+ processors).
This source code was used in multiple emulators and this bug prevents doors from opening in Dungeon Master II for Amiga and Dungeon Master II for Macintosh when using these emulators. Both versions of the game were developed on Macintosh using the same compiler (THINK C), producing similar code that use some of these instructions with buggy emulation.