My problem is explained in the title.
I followed the steps of this link to try and get it to work but it seems I have another problem as the wifi works flawlessly at startup. Some related info:
robin@mydevice:~$ cat iwconfig_output.txt # When my device doesn't work anymore (device not ready).
lo no wireless extensions.
enp2s0 no wireless extensions.
docker0 no wireless extensions.
wlp3s0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
robin@mydevice:~$ iwconfig # at startup when things work flawlessly
lo no wireless extensions.
enp2s0 no wireless extensions.
wlp3s0 IEEE 802.11 ESSID:"**personal info**"
Mode:Managed Frequency:5.54 GHz Access Point: **personal-info**
Bit Rate=650 Mb/s Tx-Power=24 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=62/70 Signal level=-48 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
docker0 no wireless extensions.
robin@mydevice:~$ iwconfig # after I disconnected from network but things still work
lo no wireless extensions.
enp2s0 no wireless extensions.
wlp3s0 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
docker0 no wireless extensions.
robin@mydevice:~$ rfkill
ID TYPE DEVICE SOFT HARD
0 wlan phy0 unblocked unblocked
Edit: Ubuntu version
robin@mydevice:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
Docker version:
robin@mydevice:~$ docker version
Client:
Version: 20.10.12
API version: 1.41
Go version: go1.16.15
Git commit: e91ed5707e
Built: Mon Mar 21 06:17:35 2022
OS/Arch: linux/amd64
Context: default
Experimental: true