If anyone's looking for an android project, please make one that forwards all hotspot traffic over whatever VPN is enabled. I guess the phone will need rooting.
For what it's worth: LineageOS (and probably other ROMs too) has a setting ("Allow clients to use VPNs") for this in the tethering settings screen. With root and four or five lines of bash script you can replicate this behaviour according to various StackExchange answers.
I'm not sure if this is a setting that comes from LineageOS or from upstream AOSP, but at least the feature is there as a starting point.
That seems cool, but I'm looking for something that would be totally transparent to connected devices (i.e. wouldn't require reconfiguring them at all).
Are you sure? By default if you use a VPN, only apps on the device will use it. If you enable a wifi hotspot, any devices connected to the hotspot won't route their traffic over the VPN. Have you tried checking your IP from your laptop?