I don’t know why this problem happened, but the solution was simple.
Instead of opening Excel and inserting a pivot table sourced from Power BI, I went into Power BI and exported for Analyze in Excel. When I opened the downloaded excel file, everything worked perfectly.