"Wait" shouldn't be used here.
Try the Timer behavior. Add it to some object (background sprite or something).
On click -> Start Timer "HideLayer" for 5 seconds (once)
Sprite On Timer "HideLayer" -> Set layer invisible
If player clicks several times, the timer will be restarted every time for 5 seconds.
Another way to do it is to use system expression "time". Add a variable hideLayerTime, then add these events:
On click -> Set hideLayerTime to (time+5)
Compare variable hideLayerTime is Less than (time) -> Set layer invisible
System Trigger once