In 2-dimensional contact, the only one of cylinder and piston bodies can become a flexible body.
Figure 1 2-dimensional contact
More:
Modeling Options
Properties