Your "current detector pen" is picking up stray voltage capacitively coupled into the cables from adjacent wiring. Inserting a lamp shorts out that stray voltage. Get a proper two-terminal voltage tester, or a multimeter, or an electrician, because this apparent strange behaviour is not why your...