Not usually illegal unless there’s a bylaw or road markings that prohibit it.
The act of getting it up there,
driving other than on a road, is the primary offence.
The parking bit isn't an offence in most of the UK, but unnecessary obstruction very much is. This a catch all offence that applies anywhere on the highway, not just the road, and the only place it is not possible to commit the offence is in a marked parking bay.
To dodge it a driver needs to successfully argue such an obstruction is
necessary, and thus lawful.
If you can't argue the necessity, say you'd leapt out to give CPR or the like, then the offence is complete. Simply not having a driveway won't cut it. Sadly in most or the UK the powers were removed from the police in 2005 under the SOCAP legislation, so there is no one enforcing the offence of
unnecessary obstruction - the dibble have only emergency powers for UO and are no longer the primary enforcement body.