An IP address uniquely identifies every computer on the internet.
The key word there is unique.
Become a Patron of Ask Leo! and go ad-free!
If two computers on the same network have the same IP address … well, the results are unpredictable. It depends on how all the other equipment on the network handles the problem. In general it could be as bad as both machines not being able to communicate at all. More likely only one will not be able to, or perhaps there will simply be intermittent problems on both.
In short: don’t do it.