PLease note the passages:
Peter accuses Ananais of LYING to the HS, that the lie has to do with money is irrelevant to the fact that he lied:
3 But Peter said, “Ananias, why has Satan filled your heart to lie to the Holy Spirit and to keep back some of the price of the land? 4 While it remained unsold, did it not remain your own? And after it was sold, was it not under your control? Why is it that you have conceived this deed in your heart? You have not lied to men but to God.”
As for his wife, Peter knew that she knew the truth so he asked her and what did she do? Lie.
8 And Peter responded to her, “Tell me whether you sold the land for such and such a price?” And she said, “Yes, that was the price.” 9 Then Peter said to her, “Why is it that you have agreed together to put the Spirit of the Lord to the test? Behold, the feet of those who have buried your husband are at the door, and they will carry you out as well.” 10 And immediately she fell at his feet and breathed her last, and the young men came in and found her dead, and they carried her out and buried her beside her husband.
The issues was not that they kept some of the money, the issue was they lied.