What would happen when the fuel tank of a Cessna 172 became (partial) vacuum during horizontal flight?
The 172S POH, the current version in production indicates:

FUEL VENTING
Fuel system venting is essential to system operation. Blockage
of the system will result in decreasing fuel flow and eventual engine
stoppage. Venting is accomplished by an interconnecting line from
the right fuel tank to the left tank. The left fuel tank is vented
overboard through a vent line, equipped with a check valve, which
protrudes from the bottom surface of the left wing near the wing
strut. Both fuel filler caps are also vented.

FUEL SELECTOR VALVE
The fuel selector valve should be in the BOTH position for
takeoff, climb, landing, and maneuvers that involve prolonged slips
or skids of more than 30 seconds. Operation from either LEFT or
RIGHT tank is reserved for cruising flight.

NOTE
When the fuel selector valve handle is in the BOTH position
in cruising flight, unequal fuel flow from each tank may
occur if the wings are not maintained exactly level.
Resulting wing heaviness can be alleviated gradually by
turning the selector valve handle to the tank in the "heavy"
wing. It is not practical to measure the time required to
consume all of the fuel in one tank, and, after switching to
the opposite tank, expect an equal duration from the
remaining fuel. The airspace in both fuel tanks is
interconnected by a vent line and, therefore, some sloshing
of fuel between tanks can be expected when the tanks are
nearly full and the wings are not level.