Network not found after docker stack deploy

I performed docker stack deploy in swarm mode, but the container does not start.
The situation is as follows.
Sorry this is a bit long, but I would like to know if anyone has any information.

【Environment】
・Host OS is Rocky Linux release 9.3 on virtual machine
・Docker version 26.0.0, build 2ae903e
・Two hosts are clustered with swarm mode enabled.
・The overlay network is being created.

【event】
I deploy a container with docker stack deploy -c docker-compose.yml but the container does not start.
No output in docker logs. If you try to start it with docker start

Error response from daemon: network zws6wsfiyfjfw9a26daiyxzkh not found

is output.

【Confirmation.】
・The zws6wsfiyfjfw9a26daiyxzkh, which is marked “not found”, exists.
・The results were the same without the overlay network.
・I added init: true and cap_add: - ALL to docker-compose.yml, but the result was the same.
・The event occurs if the OS type image is, for example, debian, ubuntu, rockylinux, and so on.
With httpd and ciscocx/snmptrapd images, the event did not occur and the container was started.
・The docker-compose.yml is as follows

services:
  test:
    image: debian:latest
    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: on-failure
        delay: 5s
        max_attempts: 3
        window: 120s
    networks:
      - testnetwork
networks:
  testnetwork:
    external: true

I would like to get advice from anyone who can tell me why the container does not start with an OS type image.

How was that done? Is attachable set?

Thank you for your prompt reply.

Yes, the overlay network is created with --attachabl.
The same problem occurs without using the overlay network.

The problem of containers not starting in swarm stack deploy has been resolved for the time being.

When stack deploying, I had to write instructions to compose to run some process in the foreground.
(This is the same as httpd-foreground for httpd containers, etc.)
I tried running sshd in the foreground as shown below, but I think there are a lot of ways to do this.

command:
  sh -c '
  /usr/sbin/sshd -D
  '