it is recognized as a mouse in samsung rom as well(when it is hovering), they just replace the cursor to a hollow circle, I believe this is not too difficult to achieve.. when it is not hovering, it has pressure values just like the samsung rom, it is just up to the apps to utilize it or not,
look up squid they actually utilize the spen, and the spen button.
but I believe it is the other stuff like spen detachment actions or press and hold action to screenshot which are embedded in the UI itself and the apps made for it that make the spen unique,
but in the AOSP envirometn you can get some functionality by using one of the two apps:
GMD Spen Gestures or Spencommand, I would prefer the first one, you can even customize to do more like hold button and draw gesture to simulate the back button, it is really handy
I shared my setup, It doesnt look as pretty as samsung rom, but I achieved a more functional one (at least for my needs), check the second paragraph in this post and check the video at the bottom.
as for the mouse cursor: there was a way through xposed to could change the icon of the mouse cursor but I believe it is outdated now, but a little research I believe it can be done again, I believe it boils down to an image in the system folder that has to be replaced
and to finish this properly: most people will love the spen in samsungs rom, thats where it was baked and works the best, I do respect that. its just finding a way for people who like AOSP roms to get the most of what was lost