The IRS originally said that they would only issue stimulus payments until January 15. But they are continuing to issue stimulus payments until February 5.
A lot of people are in the same situation that you are in. The IRS has yet told us how they intend to resolve this. They will know that you filed for a stimulus payment and then received one.
It is very possible that they will remove the stimulus from your tax return. But that is not yet known.
You can cash the check and spend the money.