I think the problem might be more of a "extended desktop" vs. "duplicate desktop" issue.
When you connect your laptop to a projector, you can project it in 2 different modes.
- Extended desktop is where the projector acts as a 2nd screen
- duplicate desktop is where the projector just mirrors what you see on your Surface.
In your case, it seems like the computer starts off as duplicate desktop and then somehow switches over to extended desktop. This has probably nothing to do with OneNote per se, even if you close OneNote at that point, your computer will still be projecting as an extended desktop.
If this only happened once, it might be a loose connection between the computer and the projector, which caused it to reset. Just means next time, you can try to make sure that the connections are good.
If it happened multiple times, my recommendation would be to try a different dongle or cable that connects between your computer and the projector. And if that doesn't work, try switching out the projector. It might be the case that there is a problem with the cable between the projector and your computer which is causing it to "reset" into an extended screen mode.
A user-error version of this problem might be that you're mistakenly hitting "windows+P", which switches the modes, but I doubt that that's what you're doing.