Customed 404.html not served with group main pages + group project pages

Hello i need help here or i’ll need to work for a workaround

i have a group like mygroup

I have a project mygroup.gitlab.io

with .gitlab-ci.yml

pages:
  stage: deploy
  script:
  - npm install
  - npm run build:prod
  - mv dist/* public
  
  artifacts:
    paths:
    - public
  only:
  - stable

my build directory is generating a 404.html (copy of a generated index.html, but whatever)

https//mygroup.gitlab.io was working fine until now and correctly serving my customed 404.html page

then i created un project ressources with a .gitlab-ci.yml

pages:
  stage: deploy
  script:
    - mkdir .public
    - cp -r * .public
    - mv .public public
  artifacts:
    paths:
      - public
  only:
    - master

now both
https//mygroup.gitlab.io and https//mygroup.gitlab.io/ressources are correctly served
but my customed 404.html page isn’t used anymore !