Confirmed - I'm pretty sure this has been the way it is for ages though.
Looking up this error online, this might be a driver issue. Could you try updating your graphics driver and try again?
Edit: Nevermind. See MC-128302
Maybe the issue is the structure itself? Did it work in 1.12.2? Are the spawn conditions for monsters being met?
Same issue on arch linux, using the sway window manager (wayland).
Workaround works.