it was because Light didn't own the Death Note that was on his body, concealed by his clothing.
When the Kira Task Force got the Death Note from the New Kira in the Yotsuba Group, when Light touched the Death Note his memories returned however Kyosuke Higuchi was still alive and had ownership of the Death Note. with his restored memories Light remembered the details of his plan and used the scrap of the Death Note in his watch to kill him
Light also touches the Death Note while inspecting it, thereby regaining his memories of being the real Kira. Light then uses a Death Note scrap hidden in his watch to kill Higuchi.
Source: Kyosuke Higuchi - Appearance (last paragraph)
as he was holding the Death Note when Higuchi died Light became it's owner. After this Light gave up ownership of the Death Note but kept it on his body so he could retain his memories
Soichiro makes the Shinigami Eye Deal with Ryuk, allowing him to gain the Shinigami Eyes. Using the eyes, he is able to learn Mello's real name, though he is fatally wounded by Jose, one of Mello's gang members, and their bomb. Because Light has given up his Death Note to make his lifespan is visible while keeping one on him to prevent his memories from being erased, Soichiro dies happily believing that Light is not Kira.
Source: Soichiro Yagami - Plot (2nd Paragraph)
So for one to have their memories from their ownership of a Death Note they don't need to be the book's owner, they just need to be physically touching it.