There are only two accounts of Polyjuice Potion used to effect a gender change; all other transformations are man-to-man or woman-to-woman (or, in one case, woman to catwoman). In neither of the given examples is any explicit indication of anatomical correctness given, which is fitting for a series of novels aimed at the general PG crowd (maybe PG-13, especially in the latter half, but more the Star Wars PG-13, not the Titanic PG-13).
In Book 4, the dying wish of Barty Crouch Jr.'s mother was to free her son from Azkaban. To do so, they arranged a visit, with Barty Sr. sneaking in two portions of Polyjuice Potion. Mother and son exchanged hairs and took on each others' appearance, and Sr. snuck Jr. out of the prison, leaving the mother behind with enough Polyjuice potion to ensure the switcheroo wasn't detected until it was far too late. The dementors guarding Azkaban couldn't tell the difference, as they're blind, and both mother and son were sick at the time.
In Book 7, six other Order members, including Fleur and Hermione, take a dose of Polyjuice with Harry's hair in it to transform into him. After doing so, they all change into matching clothes, and Harry wished they'd do so a little less cavalierly:
The real Harry thought this might just be the most bizarre thing he had ever seen, and he had seen some extremely odd things. He watched as his six doppelgangers rummaged in the sacks, pulling out sets of clothes, putting on glasses, and stuffing their own things
away. He felt like asking them to show a little more respect for his privacy as they all began stripping off with impunity, clearly more at ease with displaying his body than they would have with their own.
One interesting point is that both Rowling as author and David Yates as director tastefully ignored the fact that the girls would almost certainly not be wearing boxer shorts (though Yates couldn't pass up the opportunity to have Daniel Radcliffe in a bra for the movie scene). At the very, very least, Daniel Radcliffe has a few more inches at the hip than Emma Watson or Fleur's actress Clémence Poésy. So, the two possibilities, equally and hilariously embarrassing, are either that two of Harry's doppelgangers would be wearing extremely tight-fitting women's panties during the escape, or that they would have stripped naked to put on men's underwear. If Polyjuice does have the effect we are supposing, there would be an additional, rather painful restriction a bit further below the hipline, as women's undergarments are not designed with much room or elasticity in that area.
Either way, the fact that Harry's embarrassed is the best evidence we have, and while it's somewhat inconclusive it indicates, as best as could be conveyed in a PG/PG13 novel, that the transformation is "complete", as it were.
As far as "functional", that's more likely not to be the case. It's a temporary transformation, first of all, and second, the person retains their sense of self; they have to learn to adopt the mannerisms of the person they're transforming into. The movies take it one step further; people changed by the Polyjuice Potion still sound like themselves (with the notable and singular exception of Barty Crouch Jr alias Mad-Eye Moody in GoF). While I definitely wouldn't recommend a pregnant woman taking the potion, I don't think the transformation's much more than skin-deep.