Why would power go off and on after replacing an electrical panel?
A loose connection could explain the problem, and could also cause a fire. You should have the installation inspected by a professional.