diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml
index b5153ae668c3219dacd0829119e842a7ab850161..0e2993bffcfd3719f7f31dc1ff56511b73f321b6 100644
--- a/.gitlab/ci/rails.gitlab-ci.yml
+++ b/.gitlab/ci/rails.gitlab-ci.yml
@@ -336,28 +336,27 @@ rspec system pg14 no_gitaly_transactions:
 rspec-ee migration pg14 no_gitaly_transactions:
   extends:
     - rspec-ee migration pg14
-    - .gitaly-without-transactions
+    - .ee-only-gitaly-without-transactions
 
 rspec-ee background_migration pg14 no_gitaly_transactions:
   extends:
     - rspec-ee background_migration pg14
-    - .gitaly-without-transactions
+    - .ee-only-gitaly-without-transactions
 
 rspec-ee unit pg14 no_gitaly_transactions:
   extends:
     - rspec-ee unit pg14
-    - .gitaly-without-transactions
+    - .ee-only-gitaly-without-transactions
 
 rspec-ee integration pg14 no_gitaly_transactions:
   extends:
     - rspec-ee integration pg14
-    - .gitaly-without-transactions
+    - .ee-only-gitaly-without-transactions
 
 rspec-ee system pg14 no_gitaly_transactions:
   extends:
     - rspec-ee system pg14
-    - .gitaly-without-transactions
-
+    - .ee-only-gitaly-without-transactions
 
 # Dedicated job to test DB library code against PG13.
 # Note that these are already tested against PG13 in the `rspec unit pg13` / `rspec-ee unit pg13` jobs.
diff --git a/.gitlab/ci/rails/shared.gitlab-ci.yml b/.gitlab/ci/rails/shared.gitlab-ci.yml
index 41d3351074222f59dea442f7b4c64eb9dd8009ad..941e974484b0a391dae41e2988d4511bb9229f00 100644
--- a/.gitlab/ci/rails/shared.gitlab-ci.yml
+++ b/.gitlab/ci/rails/shared.gitlab-ci.yml
@@ -66,6 +66,12 @@ include:
   variables:
     GITALY_TRANSACTIONS_ENABLED: "false"
 
+.ee-only-gitaly-without-transactions:
+  extends:
+    - .rails:rules:ee-only-gitaly-without-transactions
+  variables:
+    GITALY_TRANSACTIONS_ENABLED: "false"
+
 .rspec-base-needs:
   needs:
     - !reference [.repo-from-artifacts, needs]
diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml
index 400d232fd0d069a2a26cf54ffa231f28437e282f..e775ccfd9d1a2f468aa25e72e85d56a7562cd9bd 100644
--- a/.gitlab/ci/rules.gitlab-ci.yml
+++ b/.gitlab/ci/rules.gitlab-ci.yml
@@ -2002,6 +2002,12 @@
     - <<: *if-schedule-maintenance
     - <<: *if-merge-request-labels-run-without-gitaly-transactions
 
+.rails:rules:ee-only-gitaly-without-transactions:
+  rules:
+    - <<: *if-not-ee
+      when: never
+    - !reference [".rails:rules:gitaly-without-transactions", rules]
+
 .rails:rules:ee-and-foss-migration:
   rules:
     - <<: *if-fork-merge-request