Three edges along one dot

Hey everyone!
I am trying to create an object’s corner with sharp corners. However, there will be some overlapping going on. Can this be solved or do I need to use round corners?
See the top right corner where 3 edges meet, the top two edges being from one object, therefore the sharp corner works, but the vertical one being a different object itself:


I tried rendering the stroke within the shapes and closing the bottom shape while repeating some lines of the top shape, but that results in the overlapping lines becoming twice as thick.
Best wishes,
Shu