Opened LibreOffice Calc windows from double click are grouped under generic icon

When I double-click on any .ods files inside Desktop or Dolphin, they are opened and grouped under the generic icon. While opening Calc from Kickoff or pinned icons seems to force it to group under the correct Calc icon.

Running qdbus org.kde.KWin /KWin queryWindowInfo on different windows shows:

Calc started from Kickoff or pinned icons

activities: ea074252-adac-4b93-ad1a-4ff778d15031
caption: Untitled 6 — LibreOffice Calc
clientMachine:
desktopFile: libreoffice-calc
desktops: 9e4d830a-ef53-4471-8c9c-3ce37ac65b32
fullscreen: false
height: 736
keepAbove: false
keepBelow: false
layer: 2
localhost: true
maximizeHorizontal: 2
maximizeVertical: 1
minimized: false
noBorder: false
resourceClass: libreoffice-calc
resourceName: soffice.bin
role:
shaded: false
skipPager: false
skipSwitcher: false
skipTaskbar: false
type: 0
uuid: {5b6fea5f-a475-402a-a7f4-063cd47dcbda}
width: 1366
x: 0
y: 0

Calc started from double click inside Desktop of Dolphin

activities: ea074252-adac-4b93-ad1a-4ff778d15031
caption: test.ods — LibreOffice Calc
clientMachine:
desktopFile: libreoffice-startcenter
desktops: 9e4d830a-ef53-4471-8c9c-3ce37ac65b32
fullscreen: false
height: 736
keepAbove: false
keepBelow: false
layer: 2
localhost: true
maximizeHorizontal: 2
maximizeVertical: 1
minimized: false
noBorder: false
resourceClass: libreoffice-startcenter
resourceName: soffice.bin
role:
shaded: false
skipPager: false
skipSwitcher: false
skipTaskbar: false
type: 0
uuid: {387ea3f8-f213-4ee1-9156-77c3f551d88c}
width: 1366
x: 0
y: 0