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