That he is demoted to executive officer of Enterprise is beyond doubt.
Although he acknowledges that his 'official' rank in that position is Commander, as Pike has been made Captain of the Enterprise again, maybe that doesn't necessarily mean that his actual
rank takes a hit. Maybe he can still technically be a Captain and yet also be an XO/Commander. His "spoken rank" is really only reflective of his position aboard the ship, at least for the 20 seconds that Pike has resumed the Captaincy anyway.