Honestly this is one of the hardest things to do when writing Interactive Fiction.
For me, it shows mostly in the character creation steps, where it’s very varying whether the writers manage to weave it into the story or just have it feel weird and awkward. Some have everything in one spot, making it a massive, immersion-breaking chunk which is over and done with fast, others pace it, sometimes through the entire book, where, when it shows up later, it can really throw you off because at that point at least I have left character creation behind me.
I can’t say that I know of a game that has done it perfectly for me (certainly not my own), it has always been a swing between broken flow and no customization.
For me, I focused on trying to drag in people and get the story started before the first customization choices, and then pacing them out and trying to integrate them one by one in little chunks. Never having enough at one time to make people lose interest (as I am wont to do), but still giving people the opportunity to be their own person.
In other words, a story might ask me my name but then it tells me that I AM a pirate aboard a ship. I can choose my name, but I certainly didn’t get consulted about my preferences for job occupation, so it’s a bit disconcerting.
That’s generally not an issue for me, often the big things like that is advertised on the book. You buy it because you want to be a pirate, but whether you’re a peg-legged, bearded Scotsman or a raven haired spanish beauty might be up to you, the story remains much the same.
tldr: Immersion is hard, but when you pull it off, interactive fiction beats pretty much everything else.