Reading this : https://forum.magicmirror.builders/topic/4684/electron-cpu-usage/245

The last post says that the rotation doesn’t work with the drivers that are standard for Rpi 4.

So I would suggest you keep it in landscape mode and rotate it with html/css instead.
https://forum.magicmirror.builders/topic/9707/save-performance-when-rotating-screen-e-g-on-raspberry-pi