Tip: Layer 3 backgrounds and tides disappear when you hit a message box, so unless you apply this fix, plan your level around that. For example, you can add a sublevel without layer 3 at the start/midpoint, and include your message there.
A custom sprite that behaves similar to the Yoshi Coin objects.
Using the Extension field when inserting the sprite, the sprite is capable of being placed behind objects, placed on line-guides, appearing only when the On/Off switch is switched, and so on.
There are also many settings available in the .ASM file that can be configured, such as whether or not you want the glow effect to display, how the game "remembers" which coins were collected, and so on.
It technically can be used in conjunction with the default Yoshi Coins, but if you opt against it you can make use of an optionally provided patch which makes the Yoshi Coin counter in the HUD display coins non-linearly -- as in, if you only collect the 4th Yoshi Coin in a level only the 4th one will display in the HUD!
collectable, dragon coin, yoshi coin
Most of the time, the sprite works as intended. However, setting !RememberCoins1 in the sprite will cause existing sprites to disappear except when the game crashes. The patch isn't much better in that regard: Applied with it enabled will hardlock the game altogether.
There also some other issues with this sprite which you should take a look at:
The moon is tied too much with the Yoshi Coins. That means, they use the same collect flags and when you have all Yoshi Coins collected, they turn gray or disappear from the level.
Conversely, they aren't dependent at all on the all moons collected flag which IMO makes more sense to me.
You can restore the alternate Yoshi Coin patch but it won't clean the code.
Edit: And I once again forgot to note the tools I used: