Xcodebuild and Xcode UI shows different code coverage results

Case 1: If I build project and perform the unit and UI tests via XCode and generate report It shows correct coverage % (Via Command+U)

Case 2: If I build and tests using "xcodebuild" command (command line mode) then it shows different % (which has lower coverage then case 1)

Command I used to build the trest (A):

xcodebuild test -enableCodeCoverage YES -scheme iOS_Template -project iOS_Template.xcodeproj -configuration Debug -destination 'platform=iOS Simulator,name=iPhone X'

Command I used to check the result (B):

xcrun llvm-cov report -instr-profile ~/Library/Developer/XCode/DerivedData/*/Build/ProfileData/*/Coverage.profdata ~/Library/Developer/XCode/DerivedData/*/Build/Products/Debug-iphonesimulator/iOS_Template.app/iOS_Template


It found that when I use command (B) to check the result in case 1 it also shows the correct % so I suspect if something set wrong in Command (A).