Force fields are a common trope in science fiction, especially in Star Trek, which overuses it in my opinion 😉
It turns out real life has something close to it – the plasma window. Invented at Brookhaven National Laboratory by Ady Hershcovitch in 1995, it is used to allow beams that can only be generated in vacuum (such as electron beams) to pass into an atmosphere. The patent is here. An illustration is below.
A dense plasma, contained by azimuthal magnetic fields, can be an effective barrier between an atmosphere and vacuum. It can hold a pressure differential of up to nine atmospheres. In this application, the actual window is pretty tiny owing to the (presumably) huge amounts of power required to operate this.
But assuming power was no object, it doesn’t seem like a terrible stretch of the imagination to have an airlock or spacecraft hangar use this. Just like Docking Bay 327 on the Death Star. Although I doubt the plasma would be see-through.
NASA Tech Briefs has a deeper description here.