Text this: Distributed and boundary optimal control of the Allen–Cahn equation with regular potential and dynamic boundary conditions