Creating a player unit then using the attributes menu to change the unit type and then undoing that change, causes the unit to no longer be the player.
Note: doesn't happen if the unit is playable instead or for logic entities.
Here's a video showcasing the bug: https://youtu.be/KxRY_wHgEwY