Dears.
As shown below, the SW is located in front of the input pin, so when opened, the level is floating.
Can you lower the output pin to low level by applying a pull-down resistance?
Again, when the SW is short, ask if the output of this circuit can go to the high level.
Thank you