You won't keep the purpleheart violet more than likely, it's practically impossible by all accounts and attempting it on a mallet presents additional difficulties. But I have three varied strategies to suggest.
First, don't finish it at all. When not in use store the mallet where it gets the least light exposure (ideally in the dark) and when it eventually starts to brown re-sanding it to bring the colour back. Obviously there's a limit to how many times you can do this, and I imagine sometime in year two you'll decide you actually don't mind it going brown so much
Second one is sort of the most obvious because of the UV protection: yacht varnish. Not a bog-standard one like you'd find in B&Q but a full-on marine varnish loaded with UV absorbers from the likes of Epifanes that a chandlers would sell (also available through Amazon). You don't want to build a significant surface film because that will chip off so decant a few spoonfuls, thin it to turn it into wiping varnish and apply it with the wipe-off-all-excess method. After about four or five coats there won't be a distinct surface film and you may have a reasonable (indoor) level of protection from UV. Even thinned as much as you're going to need to drying time could still be slowish so you'll need to be patient between coats and when you're done, after the last coat you should wait a fortnight minimum before using the mallet but ideally the full month suggested for varnish to cure so it has toughened up as much as possible.
Last but not least, don't laugh, you can treat the wood with some photo-stable sun cream, the higher the SPF the better. You won't be able to apply any proper wood finish on top of this but mallets don't generally need a finish. The wood will take on that oiled look that most modern cutting boards have, which enhances the depth of colour. There's no telling how long the protection will last but of course you can reapply periodically to top it up.
Yacht varnish probably stands the greatest chance of giving you long-term protection indoors but unfortunately right from the start it will subdue the violet colour of the wood, as well as noticeably yellow the maple, because of its inherent amber colouring. With sun cream it is colourless naturally so the purpleheart will look its best initially.