Glasshouse by Charles Stross

In a future where humanity has spread across the stars and identity can be altered at will, a former soldier named Robin is recovering from a memory wipe in a rehabilitation center. He is drawn into an experimental society designed to recreate the 20th century, a time of rigid gender roles and limited technology, as part of a mysterious project. As Robin navigates this bizarre world, he uncovers a sinister conspiracy that threatens not only his existence but the fabric of reality itself, forcing him to confront his past and the true nature of identity and freedom.

Purchase from Bookshop.org