not totally sure if this is solving your problem, but…
I had my containers in a specific vlan and was able to do that again after the upgrade to 24.10 using this:
Basically I added the required ip-address for the container to the network interface as an alias and then added the ip-address to the ports section of the yml:
ports:
- "192.168.24.24:80:80/tcp"