Of course. If you steal but give it back later, same thing. Sin is sin. Remember confession involves repentance, confession, will to not do it again, and penance and or reparations. Just because you did some reparations before you went to confession does not mean that you can just take care of it yourself.
What if the lie was that a bridge was safe. Then later you admit it wasn’t? Still a sin.