Inconsistent Behavior with Network Manager

Hello, I am currently using network manager and dbus in order to manage multiple ethernet interfaces. I currently have 2 ethernet interfaces which I am changing to fit my needs as the code goes on. My problem is that if I do the same things multiple times in a row it does not have consistent behavior. Initially, when I change them everything works as expected. However, after a few iterations things start to get weird. Sometimes my new ip addresses show up on my dashboard, but when I try to ping them, they are unreachable. The only consistency I can see is when I look deeper into the behavior. When I see that the connection only has an ip4config, usually, it means that it will be unable to connect. When the ip4config and the connection are different, it will usually ping to the connection, but display something else. Finally, when they are the same, that is when I get expected behavior. Does anyone have any ideas on how I can understand this/what I should do for this. Any help would be much appreciated. Thank you!

Also in my journalctl it says this:

device (enp87s0): Activation: starting connection 'Static-enp86s0' (d15fff9a-2451-11ef-9d37-0242ac110002)
Jun 06 22:13:02 61cba17 NetworkManager[1880]: <info>  [1717711982.3119] device (enp87s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 06 22:13:02 61cba17 NetworkManager[1880]: <info>  [1717711982.3123] device (enp87s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 06 22:13:02 61cba17 NetworkManager[1880]: <info>  [1717711982.3131] device (enp87s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jun 06 22:13:02 61cba17 NetworkManager[1880]: <info>  [1717711982.4618] device (enp87s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Jun 06 22:13:02 61cba17 NetworkManager[1880]: <info>  [1717711982.4903] device (enp87s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jun 06 22:13:02 61cba17 NetworkManager[1880]: <info>  [1717711982.4904] device (enp87s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jun 06 22:13:02 61cba17 NetworkManager[1880]: <info>  [1717711982.4908] device (enp87s0): Activation: successful, device activated.
Jun 06 22:13:12 61cba17 NetworkManager[1880]: <info>  [1717711992.6610] device (enp86s0): carrier: link connected
Jun 06 22:13:12 61cba17 NetworkManager[1880]: <info>  [1717711992.6616] device (enp86s0): state change: unavailable -> disconnected (reason 'carrier-changed', sys-iface-state: 'managed')
Jun 06 22:13:12 61cba17 NetworkManager[1880]: <info>  [1717711992.6629] policy: auto-activating connection 'Static-enp87s0' (d1611fba-2451-11ef-9d37-0242ac110002)
Jun 06 22:13:12 61cba17 NetworkManager[1880]: <info>  [1717711992.6636] device (enp86s0): Activation: starting connection 'Static-enp87s0' (d1611fba-2451-11ef-9d37-0242ac110002)
Jun 06 22:13:12 61cba17 NetworkManager[1880]: <info>  [1717711992.6637] device (enp86s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 06 22:13:12 61cba17 NetworkManager[1880]: <info>  [1717711992.6640] device (enp86s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 06 22:13:12 61cba17 NetworkManager[1880]: <info>  [1717711992.6648] device (enp86s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jun 06 22:13:12 61cba17 NetworkManager[1880]: <info>  [1717711992.7764] device (enp86s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Jun 06 22:13:12 61cba17 NetworkManager[1880]: <info>  [1717711992.8095] device (enp86s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jun 06 22:13:12 61cba17 NetworkManager[1880]: <info>  [1717711992.8097] device (enp86s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jun 06 22:13:12 61cba17 NetworkManager[1880]: <info>  [1717711992.8101] device (enp86s0): Activation: successful, device activated.