XP is over 15 years old and is no longer support by Microsoft. Attract-Mode uses ffmpeg for video rendering. Ffmpeg has dropped support for XP. You can read this
https://github.com/mickelson/attract/issues/464 and see another person that recently had issues with XP as well as some special builds just for XP. I don't know if any of this will fix your problem. In the link it's mentioned that Attract-Mode 2.3 works for them on XP.
Windows 7 is the way to go if you want any kind of support and want an older, lighter weight Windows OS. You can shutdown all unnecessary services and processes to it make use even less resources.
Linux is another option that isn't as bloated with unneeded services, processes and GUI.
Really the question is why XP? Old hardware? If that's the case buy a $30 Raspberry Pi and you'll likely have a better experience running Attract-Mode on top of RetroPie.
P.S. You're not going to play these games with a keyboard. Do you have the same issue if you configure a controller? Also, run the console .exe when launching Attract-Mode and see if there is any information shown there that might help resolve your issue.