The book is often attacked as not being written by Solomon. It does not claim to be - only that it expresses wisdom in the manner of Solomon. As to sudden changes, there are believed to be two authors of Isaiah (proto and deutero Isaiah) and some of the other OT books. This may be the case with Wisdom. Going further back, Moses certainly did not write about his death and burial, for example. It depends on the manuscripts used, of which there are quite a few, but no originals - just copies of copies of copies some with quite a few differences.