Zoneminder was changed a lot in the latest version. It's possible they made changes that changed the shared memory usage. The docker itself has nothing to do with the shared memory, except for specifying the amount of main memory to use for shared memory.
In your case you are using a lot more memory from Unraid than is necessary, possibly causing Unraid to run out of memory at times.