The easiest option might be to build a drywell, assuming you cannot buid a conventional drain for some reason.
A drywell is a round pit that goes straight down and is filled with rocks and drains the water to a permeable layer. This only works if you have a permeable layer below the clay or whatever that is currently trapping the water. Permeable layers are ...
Just lock your door.
People who want to enter would likely knock or call out. Even if they don't, trying the handle is likely to make some noise. Either way, you will be in control of when people are admitted to the room.
You could get a wireless door alarm that allows you to have put it on silent and just have a visual alert, for example https://www.amazon.co.uk/Wireless-Sensor-BITIWEND-Operating-Receiver/dp/B07WMNKGCP
Similar things exist with PIR sensors
At its simplest, a door hook on the inside of your door will do the job for about $2. at a hardware store. You twist the hook into one side of the door and the loop on the door frame (or vise-versa). No tools needed.
… A simple request on the outside of your door.
According to your illustration, you can solve your dilemma by turning 90° to your left and relocating your desk and relevant accessories accordingly.
Your visual alert would be caused by someone or something interrupting your visual field.
No investment is necessary and no technical intervention is obvious.
The change might be refreshing. If you were facing ...
You can use two mirrors to see the door from your computer
Place a small mirror to the right of your computer monitor. Angle it so that when you're facing your monitor, you can see the reflection of the wall directly behind you -- and more importantly, you can see the corner of the two walls that are behind and to the right of you.
In the corner of the two ...
Maybe putting a very small thing on your note book could be a sign.Especially something that others consider that as a trash, such as a hair or something.
Also in 1984, Winston Smith put a very little amount of dirt on his notebook, or you can put them between pages (if it doesn't make your notebook dirty!).