It’s entirely independent of focal length.
It has to do with the ratio of the subject-camera distance to the background-camera distance.
As others have pointed out you prove this to yourself in one of two ways:
1. Frame with telephoto, then shoot with a wide angle lens and digitally zoom in photo.
2. Frame with wide angle and then shoot a panorama with the telephone and stich.
2 is significantly harder if you are close to the subject.