One must write applications which use Motif widgets and calls. Each toolkit is unique. For example an app written to call Gtk (Gnome) functions will not call Qt (KDE) functions. Similarly Motif. Though it is possible to mix Motif and Xaw. Developers develop their app their toolkit of choice.
I don't see Motif going away anytime soon. Though motif is mature, CDE (built using Motif) is actively being developed. Vim also has a motif flavor, which we (FreeBSD) offer as a vim port FLAVOR (vim-motif-9.0.2018).
A number of commercial apps are still written using Motif, namely Oracle apps.