You may already know this and I could be wrong as I am still researching getting my high scores to save as well but...
From what I've read, high score saving is only supported by those games that had some mechanism to save the high scores upon cabinet power-off. I downloaded MAMEUIFX and the high-scoring saving worked in Zookeeper. But most of the games I was wanting to save, DK, Pacman, etc. were not able to save high scores. I read where we could try doing a "save state" where you effectively just save the game as you're quitting out of it and then you need to "load saved state" when you want to play again. This didn't sound very seemless to me, especially using a UI version of MAME. Maybe I'm wrong?
Also, doing the save state method, your scores will end up getting wiped out if you upgrade your version of MAME later on.
Someone please correct me if any of this is wrong. This is all still new to me and some of what I'm reading may already be outdated.