If you count Zen and the Art of Motorcycle Maintenance, almost any fiction book with a philosophical angle would fit that description.

Or even books like “The Phoenix(/Unicorn) Project”.

I had trouble finishing Zen and the Art because my recollection is he drones on and on about the philosophy after the initial set up. The story disappeared. I felt kind of being had because I remember being intrigued by the title in a used bookshop as a teenager and buying it (this was before the internet) so my viewpoint is biased by that. My college philosophy textbooks managed to be more interesting and deeper than Zen, even a book about Aurelius was more interesting to me.

I wouldn't say any fictional book with a philosophical angle fits, but ones that could have been written as non-fiction but for the purposes of getting the point across weren't. Phoenix/Unicorn Project are good examples!