Should I keep the expansion tank when replacing copper with pex?
An expansion tank is only required when the water supply system has a backflow prevention device or check valve. The extra pressure caused by thermal expansion was apparently an issue in the home. I would strongly suggest that you include it in your new set up. Don't rely on the pex to expand and relieve the pressure. That could cause a pipe to rupture or a fitting to leak. Expansion tanks are typically installed in a "tee" at the cold water inlet for the water heater.