Translation in z-axis and rotation around x/y-axis using fix rigid in 2d simulation

Dear LAMMPS users,

Question: The system I want to simulate is to compress a rigid body system in 2d. In my system, the rigid particle is an ellipsoid with several spheres on its surface. When I run the simulation, I find the rigid particle still have z-direction translation and rotation around x/y-axis even though I use fix enforce2d and fix rigid torque * off off on. Though the translation and rotation is small in the small size system. But when I increase the particle number (e.g. number of ellipsoids = 5000), the rotation around x/y will become obvious that can be seen using my eyes in compressing. How can I fix this problem?

LAMMPS version: 2 Aug 2023

Operating system: Rocky Linux release 8.7 (Green Obsidian)

in script:

variable    ellipse_a equal 3.8
variable    ellipse_b equal 1.0
variable    ellipse_c equal 1.0
variable    sphere_d equal 0.4

units           lj
atom_style      hybrid molecular ellipsoid
dimension       2

read_data       50.data

set             type 1 mass 1.0
set             type 1 shape 3.8 1.0 1.0
set             type 2 mass 1.0
set             type 2 shape 0.4 0.4 0.4

group           big type 1
group           small type 2

pair_style      gayberne 1.0 1.0 1.0 5
pair_coeff      1 1 1.0 1.0 1 1 1 1 1 1
pair_coeff      1 2 1.0 1.0 1 1 1 1 1 1 
pair_coeff      2 2 1.0 0.4 1 1 1 1 1 1 

neighbor        0.5 bin
neigh_modify    delay 0 every 1 check yes


fix             1 all rigid/npt molecule temp 1.0 1.0 1.0 iso 0 10 1 torque * off off on force * on on off 
fix             2 all enforce2d


neigh_modify    exclude molecule/intra all

compute         mytemp all temp/asphere
compute         mypressure all pressure mytemp
fix_modify      1 temp mytemp press mypressure bodyforces early
compute         0 all property/atom quatw quati quatj quatk shapex shapey shapez

dump           1 big custom 2000 dump.ellipse.compress id type x y z c_0[*]
dump_modify    1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk &
                 colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez sort id

thermo_style    custom step temp epair etotal press 
thermo_modify   temp mytemp press mypressure 

thermo          2000
timestep        0.005
run             20000

write_data      compress.data

data file:

  1. System contain 50 ellipsoid, 10 spheres on each ellipsoid surface
    50.data (106.0 KB)

  2. System contain 5000 ellipsoid, 5 spheres on each ellipsoid surface
    5000.data (5.6 MB)