I was fighting all night to set up WDS with RouterOS 7.6(main router) and TP-link TL-WR740N.
Seems I had same problem. I was able to connect to internet when I connected to LAN port of TL-WR740N, but not when using WiFi. Seems issue was that on WiFi network I was not getting IP via DHCP. I found workaround for that: on my Mikrotik I changed DHCP network to 192.168.8.101-254 and I enabled DHCP on my TL-WR740N - 192.168.8.50-70. TL-WR740N has IP 192.168.8.100. Additionally in DHCP settings of TL-WR740N I put default gateway as Mikrotik(in my case 192.168.8.1) and google and cloudflare DNS servers. And now it works.
Here is manual what I used for TP-Link(I did everything as is there, besides DHCP):
https://www.tp-link.com/us/support/faq/227/
Additionally I configured manually on Mikrotik to use channel 1(2412MHz), same channel what is configured on TP-LINK. TP-LINK should detect channel automatically when you press "survey", but I'm afraid that after reboot of Mikrotik it might pickup different channel and in this case theoretically TP-LINK will stop connecting to it, because it has channel 1 in configuration. So I set-up channel 1 manually on Mikrotik.
I did some additional configuration on my Mikrotik in hope to make it work without DHCP on TP-LINK, but seems it should work with default config on Mikrotik, so those changes were unnecessary(besides channel, but I'm not sure about it too).
My Mikrotik Router is RBD53G-5HacD2HnD&EG18-EA or one with LTE modem and what is distributed by LMT.