Can a player character (occupying 1 space) in the frightened condition shape change into a larger creature (occupying more than 1 space) if that change requires them to occupy a space closer to the source of their condition? In this case, the player is against a wall and can only expand the space it occupies in the direction of the source of its fear.
The frightened condition says that a
creature can’t willingly move closer to the source of its fear
so I guess this would hinge on whether the shape change is seen as willful movement.