But seriously, it is. https://www.themotoringlaw.uk/driving-with-dogs/
"Suitable restraint" is a somewhat contentious issue, it seems.
In my experience, anything that can be projected forward to the front of the car is dangerous (dangerous driving, certainly driving without due care).
Many many years ago, I was a passenger in a car that had a collision with the car in front. There was an approx 3kg laptop on the rear parcel shelf. After the accident, it was found embedded in the rear window of the car in front. We were just glad that our heads weren't in its way!