Agreed that women have been discouraged to be in male-dominated fields for longer than eternity.
And I am surprised that your Physics teacher ACTUALLY told you to drop it (assuming it wasn’t just an advice based on your circumstances and was actually gender-biased).