IPFS Private network setup

How ipfs work in private network, if any node goes out of private network?
Ex. If there are multiple node setup in office network and some node(machines) move to home network and there IP get changed? Is that node still work in ipfs network?
or how to handle this use use case?

As long as the moving node is still able to contact one node in the network, it should be fine. Here is what should happen:

At the office, all the nodes are connected to some others. They exchange their multiaddrs with each other, meaning all the ways to contact them. It typically includes an IP on the local network, and a public, Internet-facing address. Since the nodes are in the same office, they will communicate via the local address because it’s faster. But they are aware of the other multiaddres/IP.
When the node disconect from the office physical network, it will lose the connection to its peers via their multiaddresses on the local network. It will then try to contact them with their internet-facing addresses, and succeed. On the office side, the news that the remote node has changed its IP (hence its multiaddrs) will be propagated every time a node asks to connect to this remote node.

TL;DR: if both the office nodes and the home node can access the Internet, the connection won’t be lost.

Thanks @Akita for the quick reply,

So node(my laptop) will still in office network node group, If I carry my laptop(node) at my home correct?

If your office network can connect to the internet yes. If your office network has a very aggressive firewall, is air gapped, or use VPN or proxies to connect to the internet, then it might either work out of the box, needs some config work, or be impossible.
You should test it and you’ll see.