If a position player takes the mound to pitch, they still keep their place in the batting order as pitcher. The sub at 1B would then bat in the DH's spot, and the DH would be forfeited for the rest of the game.
The Ohtani rule allows the starting pitcher to be both DH and P. If Ohtani is removed for a reliever, he can remain as DH, or if he's pinch-hit for, he can remain as pitcher.