I read a comment by @Chris_QPW where he wrote "the QIF format has no syntax for security lots". I discussed it with him and subsequently tested and learned that the exported QIF file that Quicken generates cannot handle the security "lots" correctly if FIFO method is not used in the Sold transactions.
Test example in an investment account:
* Date1-Lot1: Bought 20 shares of XYZ
* Date2-Lot2: Bought another 20 shares XYZ
* Date3: Sold 5 shares of XYZ from Lot2 (not FIFO)
I verified that the remaining lots were correct:
* Date1-Lot1: 20 shares
* Date2-Lot2: 15 shares
Next I did a file export to QIF and imported it into a new Quicken file, and the lots were:
* Date1-Lot1: 15 shares
* Date2-Lot2: 20 shares
In other words the QIF file took the sold shares out of the first Lot (instead of Lot2 in this case), hence "the QIF format has no syntax for security lots". In comparison the QXF export handled this test correctly.
Something I was not aware of and thank you @Chris_QPW. I don't know what other limitations there may be and feel free to comment.
Hope this helps someone in the future.