Speaking form experience: The behavior can be fairly unpredictable and depends on the surrounding objects as well as the texture of the surface.
Ultrasonic distance sensors are just sonars that ping at a higher frequency than humans can hear. They work by bouncing sound off of an object and measuring the amount of time it takes to get back. When an object is slanted or angled away from your sensor, it can deflect the sound rather than bouncing it back toward the sensor, making the object essentially invisible to your sonar. However this can be effected by the texture of the surface.
Rough surfaces can scatter sound, sending it in multiple directions. So an angled rough surface may still be detectable to your ultrasonic distance sensor.
When you get an inacurate reading, one of two things will happen. 1: Your sonar ping will bounce off of a surface, hit another object, and bounce back, returning the distance from your sensor, to the surface to the object.
2: The sound will deflect your sound which will be deflected and absorbed, without returning to your sonar sensor. This will return a distance of infinity or whatever your maximum measurable distance is.
I hope this answers your question!