Spectacle transparency issue

For some reason when I make a screenshot of an active window and window shadow is selected, I get a black box around my picture. Strangely, if I wait a few more seconds after the first copy command (either ctrl+c or clicking the copy icon), and hit the copy command again, then the normal good-looking transparency effect applies. This bug wasn’t present in the previous version of EndavourOS, but now it is, for me.

Picture: Before and after. (Background is gray, Discord)

This issue is not present if I save the image and do not copy and paste it from the Spectacle window.

Edit 1: The issue sometimes disappears, and fixes itself. Don’t know what causing this.
Edit 2: Seems like dragging the screenshot’s preview image and putting it to the target window doesn’t reproduce this issue, and can work as a workaround. CTRL+C copy and the copy button produces the problem.