Hi,
Sorry for the trouble caused at your end.
Per your description, we understand the problem you’re encountering i.e. when you select the data in the inserted Pivot Table it prompts Data source reference is not valid. But, when we tested at our end, we can’t reproduce the problem at our end.
In this situation, we request you to check the behavior by creating a new Pivot Table. If it doesn't work, you can copy the data of the problematic Excel workbook into a new Excel workbook to check the outcome.
Appreciate your patience and understanding. Have a good day and stay safe 😊
Best Regards,
Chitrahaas