I have been having this issue for a while where the screen turns black momentarily while using the pen in PowerPoint and Whiteboard. Sometimes PowerPoint/Whiteboard will crash. The problem seems MUCH worse lately to the point of being unusable while teaching. Always when this happens OBS will stop capturing updates from the app so new notes are not drawn. I have to close Whiteboard and start it again for OBS to resume capturing the app.
Same error in event viewer that others are seeing dwm.exe / heatcore.dll. The only thing I have to contribute is it seems to be exacerbated when streaming so when the display is being captured like when using Zoom / OBS. Maybe people using a duplicate display are also capturing the display in a way.
Also this might be correlation not causation but the crashes seem worse when the tablet gets really hot (Surface Pro 7).
And yes the fancy pens will also cause the crash but it seems to work a lot longer before it happens.