If you use the spell initiative dice it will include the initiative modifier and also apply a effect of "casting". The casting effect is placed so that if the character gets hit before his initiative the spell is "lost" (per rules) and a chat message indicates that. The spell slot is not removed (thats up to player/dm) but the output indicates the occurrence.
https://i.imgur.com/xrQC35Q.png
Hope that answered your question.