This is in conflict with MLB rules for the DH:
The Designated Hitter may be used defensively, continuing to bat in the same position in the batting order, but the pitcher must then bat in the place of the substituted defensive player, unless more than one substitution is made, and the manager then must designate their spots in the batting order.
Once a Designated Hitter assumes a defensive position this move shall terminate the Designated Hitter role for the remainder of the game.
Rules, Regulations and Statistics | MLB.com: Official info