Ways to prevent spawn egg from consuming

This is a repost due to the previous one marked as closed but there's a problem appeared for the suggested solution. I hope that is okay, since the original post was over a week ago and even it is reopened no one seems to be able to see it..

I'm trying to make a spawn egg that places a custom block, but I need the spawn egg to have a max_stack_count:1 and does not consumes upon using (there's other costs for placing it). I use advancement to trigger a function to process the placing of the block, and tried to replace weapon.mainhand to the spawn egg, but this cannot correctly process the situation of using it from offhand. I tried using the use_remainder component but it doesn't apply to spawn eggs. The following is the advancement I used https://misode.github.io/advancement/?share=olIvP38pvG

(The type of the block placed is handled by the function, so I only need a way to tell which hand the spawn egg was used in.) I checked the wiki so I think maybe not, but is there a way to modify the criteria of the advancement so that it can detect which hand the spawn egg is used in? If there isn't, are there any workarounds? I know I could probably just give the player the spawn egg back...but this block is intended to be used mid combat so simply giving back could be a problem..

I already tried tagging all players every tick depending on which hand they hold the spawn egg and replacing their hand respectively when the block placement advancement is trggered. However, if the player places the egg from mainhand with offhand empty and instantly press the switch hand keybind (default F), the egg will be duplicated, resulting in both hand holding the egg.

Continue to help post